| skipped 162 lines |
163 | 163 | | http_error_301 = http_error_303 = http_error_307 = http_error_302 |
164 | 164 | | |
165 | 165 | | |
166 | | - | def parse_payload(url=None, data=None, is_multipart=False, injection_type=None, payload=None, param_name=None): |
| 166 | + | def parse_payload( |
| 167 | + | url=None, |
| 168 | + | data=None, |
| 169 | + | is_multipart=False, |
| 170 | + | injection_type=None, |
| 171 | + | payload=None, |
| 172 | + | param_name=None, |
| 173 | + | ): |
167 | 174 | | clean = lambda x: x.replace("%2b", "+").replace("%2B", "+") |
168 | 175 | | if injection_type == "GET": |
169 | 176 | | if param_name and param_name == "#1*": |
| skipped 592 lines |
762 | 769 | | table = PrettyTable(field_names=[""] if not fields else fields) |
763 | 770 | | table.align = "l" |
764 | 771 | | table.header = header |
765 | | - | entries = len(cursor_or_list) |
766 | | - | table.add_rows([cursor_or_list]) |
| 772 | + | entries = 0 |
| 773 | + | for d in cursor_or_list: |
| 774 | + | if d and isinstance(d, str): |
| 775 | + | d = (d,) |
| 776 | + | table.add_row(d) |
| 777 | + | entries += 1 |
767 | 778 | | _temp = Prettified(data=table, entries=entries) |
768 | 779 | | return _temp |
769 | 780 | | |
770 | | - | # def prettifier(cursor_or_list, field_names="", header=False): |
771 | | - | # fields = [] |
772 | | - | # Prettified = collections.namedtuple("Prettified", ["data", "entries"]) |
773 | | - | # if field_names: |
774 | | - | # fields = re.sub(" +", "", field_names).split(",") |
775 | | - | # table = PrettyTable(field_names=[""] if not fields else fields) |
776 | | - | # table.align = "l" |
777 | | - | # table.header = header |
778 | | - | # entries = 0 |
779 | | - | # for d in cursor_or_list: |
780 | | - | # if d and isinstance(d, str): |
781 | | - | # d = (d,) |
782 | | - | # table.add_row(d) |
783 | | - | # entries += 1 |
784 | | - | # _temp = Prettified(data=table, entries=entries) |
785 | | - | # return _temp |
786 | | - | |
787 | 781 | | |
788 | 782 | | def prepare_proxy(proxy): |
789 | 783 | | Response = collections.namedtuple("Response", ["for_requests", "for_urllib"]) |
| skipped 619 lines |
1409 | 1403 | | timebased_only=False, |
1410 | 1404 | | booleanbased_only=False, |
1411 | 1405 | | error_based_only=False, |
1412 | | - | stack_queries_only=False |
| 1406 | + | stack_queries_only=False, |
1413 | 1407 | | ): |
1414 | 1408 | | _temp = [] |
1415 | 1409 | | if dbms: |
| skipped 11 lines |
1427 | 1421 | | timebased_only=timebased_only, |
1428 | 1422 | | booleanbased_only=booleanbased_only, |
1429 | 1423 | | error_based_only=error_based_only, |
1430 | | - | stack_queries_only=stack_queries_only |
| 1424 | + | stack_queries_only=stack_queries_only, |
1431 | 1425 | | ) |
1432 | 1426 | | if not dbms: |
1433 | 1427 | | # fetch only boolean based and blind based payloads as we can't identify the backend dbms |
| skipped 4 lines |
1438 | 1432 | | timebased_only=timebased_only, |
1439 | 1433 | | booleanbased_only=booleanbased_only, |
1440 | 1434 | | error_based_only=error_based_only, |
1441 | | - | stack_queries_only=stack_queries_only |
| 1435 | + | stack_queries_only=stack_queries_only, |
1442 | 1436 | | ) |
1443 | 1437 | | if ok: |
1444 | 1438 | | _temp.extend(ok) |
| skipped 6 lines |
1451 | 1445 | | timebased_only=False, |
1452 | 1446 | | booleanbased_only=False, |
1453 | 1447 | | error_based_only=False, |
1454 | | - | stack_queries_only=False |
| 1448 | + | stack_queries_only=False, |
1455 | 1449 | | ): |
1456 | 1450 | | Payload = collections.namedtuple("Payload", ["prefix", "suffix", "string", "raw"]) |
1457 | 1451 | | Response = collections.namedtuple( |
| skipped 170 lines |