diff --git a/sqli.py b/sqli.py index c9ee93f..e6029ea 100644 --- a/sqli.py +++ b/sqli.py @@ -35,6 +35,9 @@ class SQLi(ABC): return rows + def substring(self, what, offset: int, size: int): + return f"substr({what},{offset},{size})" + @abstractmethod def ascii(self): pass @@ -207,7 +210,7 @@ class BlindSQLi(SQLi, ABC): cur_str = "" while True: found = False - cur_column = self.ascii() + f"(substr({column},{len(cur_str) + 1},1))" + cur_column = self.ascii() + "(" + self.substring(column, len(cur_str) + 1, 1) + ")" if charset: query = self.build_query(cur_column, table, condition, offset) for c in charset: