repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
sqlmap
lib/core/optiondict.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ optDict = { # Family: {"parameter name": "parameter datatype"}, # --OR-- # Family: {"parameter name": ("parameter datatype", "category name used for common outputs fea...
311
8,502
sqlmap
lib/core/threads.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import print_function import difflib import sqlite3 import threading import time import traceback from lib.core.compat import WichmannHill from lib.core.compat i...
272
8,741
sqlmap
lib/core/target.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import functools import os import re import subprocess import sys import tempfile import time from lib.core.common import Backend from lib.core.common import getSafeExString from...
832
38,276
sqlmap
lib/core/datatype.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import copy import threading from collections import OrderedDict from thirdparty.six.moves import collections_abc as _collections class AttribDict(dict): """ This class ...
243
6,529
sqlmap
lib/core/agent.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import re from lib.core.common import Backend from lib.core.common import extractRegexResult from lib.core.common import filterNone from lib.core.common import getSQLSnippet from...
1,390
66,685
sqlmap
lib/core/shell.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import atexit import os from lib.core import readlineng as readline from lib.core.common import getSafeExString from lib.core.data import logger from lib.core.data import paths f...
164
5,533
sqlmap
lib/utils/crawler.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import division import bisect import json import os import re import tempfile import time from itertools import islice from lib.core.common import checkSameHost...
537
29,054
sqlmap
lib/utils/hash.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import print_function try: from crypt import crypt except: # removed ImportError because of https://github.com/sqlmapproject/sqlmap/issues/3171 from thir...
1,795
71,948
sqlmap
lib/utils/gui.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import io import os import subprocess import sys import tempfile import threading import time import webbrowser from lib.core.common import getSafeExString from lib.core.common i...
1,912
79,949
sqlmap
lib/utils/purge.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import functools import os import random import shutil import stat import string from lib.core.common import getSafeExString from lib.core.convert import getUnicode from lib.core...
98
3,425
sqlmap
lib/utils/sqllint.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2025 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import os import re try: from lib.core.data import kb from lib.core.data import paths from lib.core.common import getFileItems except ImportError: kb = paths = No...
461
19,472
sqlmap
lib/utils/xrange.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import numbers class xrange(object): """ Advanced (re)implementation of xrange (supports slice/copy/etc.) Reference: http://code.activestate.com/recipes/521885-a-pyth...
120
3,509
sqlmap
lib/utils/bcrypt.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import struct from lib.core.compat import xrange from lib.core.convert import getBytes # bcrypt (Provos-Mazieres EksBlowfish); the Blowfish P/S init constants are the fractional...
147
4,575
sqlmap
lib/utils/hashdb.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import hashlib import os import sqlite3 import struct import threading import time from lib.core.common import getSafeExString from lib.core.common import serializeObject from li...
253
10,003
sqlmap
lib/utils/keysetdump.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import re from lib.core.agent import agent from lib.core.bigarray import BigArray from lib.core.common import Backend from lib.core.common import isNoneValue from lib.core.common...
320
12,410
sqlmap
lib/utils/progress.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import division import time from lib.core.common import dataToStdout from lib.core.convert import getUnicode from lib.core.data import conf from lib.core.data im...
134
5,042
sqlmap
lib/utils/jwt.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import hashlib import hmac import json import re from lib.core.convert import decodeBase64 from lib.core.convert import encodeBase64 from lib.core.convert import getBytes from li...
155
6,580
sqlmap
lib/utils/brotli.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ # Native, dependency-free Brotli (RFC 7932) decompressor, so sqlmap can advertise a browser-realistic # 'Accept-Encoding: gzip, deflate, br' and read 'Content-Encoding: br' respon...
725
29,410
sqlmap
lib/utils/timeout.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import threading from lib.core.data import logger from lib.core.enums import CUSTOM_LOGGING from lib.core.enums import TIMEOUT_STATE def timeout(func, args=None, kwargs=None, du...
38
1,110
sqlmap
lib/utils/grpcweb.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import base64 import json import re import struct from lib.core.data import conf from lib.core.data import kb from lib.core.enums import HTTP_HEADER from thirdparty.six.moves.url...
298
11,348
sqlmap
lib/utils/har.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import base64 import datetime import io import re import time from lib.core.bigarray import BigArray from lib.core.convert import getBytes from lib.core.convert import getText fr...
249
9,176
sqlmap
lib/utils/library.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ # Library facade for programmatic (in-code) usage: 'import sqlmap; sqlmap.scan(...)'. # # This is the code-level sibling of the REST API (lib/utils/api.py): both drive the engine ...
191
7,887
sqlmap
lib/utils/versioncheck.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import sys import time PYVERSION = sys.version.split()[0] if PYVERSION < "2.7": sys.exit("[%s] [CRITICAL] incompatible Python version detected ('%s'). To successfully run sq...
29
920
sqlmap
lib/utils/safe2bin.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import binascii import re import string import sys PY3 = sys.version_info >= (3, 0) try: # Py2 text_type = unicode string_types = (basestring,) except NameError: ...
114
3,681
sqlmap
lib/utils/pivotdumptable.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import re from lib.core.agent import agent from lib.core.bigarray import BigArray from lib.core.common import Backend from lib.core.common import filterNone from lib.core.common ...
216
8,769
sqlmap
lib/utils/prove.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import os import time from lib.core.common import Backend from lib.core.common import average from lib.core.common import getCurrentThreadData from lib.core.common import getSafe...
484
21,298
sqlmap
lib/utils/nonsql.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Shared detection primitives for the non-SQL injection techniques (--nosql, --xpath, --ldap, --hql, --ssti, --graphql, --xxe). Each of those engines historically carried its own copy o...
189
9,318
sqlmap
lib/utils/brute.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import division import time from lib.core.common import Backend from lib.core.common import clearConsoleLine from lib.core.common import dataToStdout from lib.co...
413
16,497
sqlmap
lib/utils/wafbypass.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import base64 import json import os import struct import sys from lib.core.common import fetchRandomAgent from lib.core.data import conf from lib.core.data import paths from lib....
156
5,615
sqlmap
lib/utils/deps.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from lib.core.data import logger from lib.core.dicts import DBMS_DICT from lib.core.enums import DBMS from lib.core.settings import IS_WIN def checkDependencies(): missing_li...
123
4,602
sqlmap
lib/utils/dialect.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from lib.core.common import Backend from lib.core.common import popValue from lib.core.common import pushValue from lib.core.data import conf from lib.core.data import kb from lib...
167
9,856
sqlmap
lib/utils/search.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import re import socket from lib.core.common import getSafeExString from lib.core.common import popValue from lib.core.common import pushValue from lib.core.common import urlenco...
162
6,190
sqlmap
lib/utils/sqlalchemy.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import importlib import logging import os import re import sys import traceback import warnings _path = list(sys.path) _sqlalchemy = None try: sys.path = sys.path[1:] mod...
169
7,741
sqlmap
lib/utils/tui.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import os import subprocess import sys import tempfile try: import curses except ImportError: curses = None from lib.core.common import getSafeExString from lib.core.com...
934
35,265
sqlmap
lib/utils/getch.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ class _Getch(object): """ Gets a single character from standard input. Does not echo to the screen (reference: http://code.activestate.com/recipes/134892/) """ ...
82
2,325
sqlmap
lib/utils/api.py
.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import print_function import contextlib import logging import os import re import shlex import socket import sqlite3 import sys import tem...
1,134
45,030
sqlmap
lib/utils/sgmllib.py
.py
"""A parser for SGML, using the derived class as a static DTD.""" # Note: missing in Python3 # XXX This only supports those SGML features used by HTML. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity ...
575
18,275
sqlmap
lib/utils/dbwire.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import importlib import logging import extra.dbwire from lib.core.common import getSafeExString from lib.core.data import conf from lib.core.data import logger from lib.core.exc...
58
1,848
sqlmap
lib/utils/paraminer.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import difflib from lib.core.compat import xrange from lib.core.common import getFileItems from lib.core.common import paramToDict from lib.core.common import randomStr from lib....
201
7,222
sqlmap
lib/request/interactsh.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import base64 import json import time from lib.core.common import randomStr from lib.core.convert import getBytes from lib.core.convert import getText from lib.core.data import c...
176
7,466
sqlmap
lib/request/rangehandler.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from lib.core.exception import SqlmapConnectionException from thirdparty.six.moves import urllib as _urllib class HTTPRangeHandler(_urllib.request.BaseHandler): """ Handl...
30
941
sqlmap
lib/request/httpshandler.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import re import socket from lib.core.common import filterNone from lib.core.common import getSafeExString from lib.core.compat import LooseVersion from lib.core.compat import xr...
154
6,505
sqlmap
lib/request/webhooksite.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import json from lib.core.data import conf from lib.core.data import logger from lib.core.convert import getBytes from lib.core.convert import getText from lib.core.enums import ...
93
3,955
sqlmap
lib/request/multiparthandler.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import io import mimetypes import re from lib.core.compat import choose_boundary from lib.core.convert import getBytes from lib.core.exception import SqlmapDataException from thi...
90
3,718
sqlmap
lib/request/comparison.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import division import re from lib.core.common import extractRegexResult from lib.core.common import extractStructuralTokens from lib.core.common import getFilte...
286
13,166
sqlmap
lib/request/keepalive.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import socket import threading import time from lib.core.settings import KEEPALIVE_IDLE_TIMEOUT from lib.core.settings import KEEPALIVE_MAX_REQUESTS from thirdparty.six.moves imp...
348
12,982
sqlmap
lib/request/pkihandler.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ ssl = None try: import ssl as _ssl ssl = _ssl except ImportError: pass from lib.core.data import conf from lib.core.common import getSafeExString from lib.core.except...
52
1,774
sqlmap
lib/request/websocket.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ # Native, dependency-free WebSocket client (RFC 6455), replacing the 'websocket-client' third-party # library. Covers exactly what sqlmap needs: the client handshake, masked text ...
231
8,068
sqlmap
lib/request/http2.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ # Native, dependency-free HTTP/2 client (RFC 9113) with HPACK (RFC 7541). Runtime code uses only # the standard library. The accompanying tests optionally use python-hyper/hpack a...
1,629
64,464
sqlmap
lib/request/connect.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import binascii import calendar import email.utils import inspect import io import logging import os import random import re import socket import string import struct import sys i...
1,843
96,979
sqlmap
lib/request/timeless.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ # HTTP/2 "timeless timing" oracle (Van Goethem et al., USENIX Security 2020) built on the native # client's exchange_pair() primitive (lib/request/http2.py). Two requests are mult...
993
62,219
sqlmap
lib/request/inject.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import print_function import re import threading import time from lib.core.agent import agent from lib.core.bigarray import BigArray from lib.core.common import ...
859
40,823
sqlmap
lib/request/chunkedhandler.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from lib.core.data import conf from lib.core.enums import HTTP_HEADER from thirdparty.six.moves import urllib as _urllib class ChunkedHandler(_urllib.request.HTTPHandler): ""...
50
2,139
sqlmap
lib/request/methodrequest.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from lib.core.convert import getText from thirdparty.six.moves import urllib as _urllib class MethodRequest(_urllib.request.Request): """ Used to create HEAD/PUT/DELETE/....
21
589
sqlmap
lib/request/basic.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import codecs import gzip import io import logging import re import zlib from lib.utils import brotli as _brotli try: from compression import zstd as _zstd # Python 3.14...
498
25,082
sqlmap
lib/request/kerberos.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ # Native, dependency-free HTTP "Negotiate" (SPNEGO/Kerberos) authentication, built on the in-tree # pure-Python Kerberos client (extra/kerberos). No 'pykerberos'/'gssapi'/'request...
100
5,187
sqlmap
lib/request/templates.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from lib.core.data import kb from lib.request.connect import Connect as Request def getPageTemplate(payload, place): retVal = (kb.originalPage, kb.errorIsNone) if payloa...
22
632
sqlmap
lib/request/direct.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import binascii import re import time from lib.core.agent import agent from lib.core.common import Backend from lib.core.common import calculateDeltaSeconds from lib.core.common ...
112
4,913
sqlmap
lib/request/basicauthhandler.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from thirdparty.six.moves import urllib as _urllib class SmartHTTPBasicAuthHandler(_urllib.request.HTTPBasicAuthHandler): """ Reference: http://selenic.com/hg/rev/6c51a50...
39
1,383
sqlmap
lib/request/dns.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ from __future__ import print_function import binascii import collections import errno import os import re import socket import struct import threading import time try: from ...
320
11,382
sqlmap
lib/request/ntlm.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ # Native, dependency-free NTLM-over-HTTP authentication (MS-NLMP / MS-NTHT), replacing the ancient # and unmaintained 'python-ntlm' third-party library. Pure standard library + th...
270
12,084
sqlmap
lib/request/redirecthandler.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission """ import io import re import time import types from lib.core.common import getHostHeader from lib.core.common import getSafeExString from lib.core.common import logHTTPTraffic from...
235
10,413
sqlmap
tests/test_report.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission JSON scan report collector/assembler (lib/utils/api.py), shared by the REST API endpoint /scan/<id>/data and the CLI --report-json writer. The whole point of the feature is that both...
227
11,765
sqlmap
tests/test_api.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Unit tests for the sqlmap REST API (lib/utils/api.py). Two complementary angles: 1. Pure helpers / objects called directly (is_admin, validate_task_options, the Database and T...
622
24,162
sqlmap
tests/test_sqlparse.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission SQL/string parsing helpers: field splitting and 0-depth (paren+quote aware) scanning, query cleanup, regex extraction. Includes regression cases for the quote-awareness bugs fixed pre...
88
3,738
sqlmap
tests/test_targeturl.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Target URL parsing (lib/core/common.py parseTargetUrl). parseTargetUrl reads conf.url and populates conf.hostname / conf.port / conf.scheme / conf.path - the values every subsequent ...
106
3,311
sqlmap
tests/test_kbchars.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Invariants of the random markers in kb.chars (lib/core/option.py). These markers are drawn at random once per run, so a collision between two of them is a heisenbug: it corrupts extr...
79
3,177
sqlmap
tests/test_dbms_enum.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission DBMS-specific enumeration overrides (plugins/dbms/<dbms>/enumeration.py), driven through each full DBMS handler with the injection layer mocked, so the dialect-specific table/column/u...
727
27,235
sqlmap
tests/test_settings_regex.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Compiled-regex battery for lib/core/settings.py. settings.py defines ~40 module-level *_REGEX patterns that drive WAF/error/ charset/IP/title detection. A bad edit to any one of them...
67
2,723
sqlmap
tests/test_http2.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Coverage for the native HTTP/2 client in lib/request/http2.py: frame and HPACK codecs, request/response validation, connection state, flow control, retries, URL handling, TLS policy, ...
905
35,103
sqlmap
tests/test_brotli.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Tests for the dependency-free Brotli (RFC 7932) decompressor under lib/utils/brotli.py, and its wiring into lib/request/basic.py::decodePage. The compressed fixtures were produced by ...
121
5,314
sqlmap
tests/test_configfile.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Offline tests for the '-c' configuration-file contract. configFileParser() walks optDict and reads an option only from the section named after the family that declares it, so an opti...
133
5,019
sqlmap
tests/test_purge.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Secure directory purge (lib/utils/purge.py, the --purge feature): multi-pass overwrite + truncation + removal of a directory's content. Driven against a throwaway temp tree so the rea...
128
4,519
sqlmap
tests/test_misc.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Assorted pure helpers: stats, set ops, value predicates, value/counter stacks, enum helpers, DBMS alias/version checks, column prioritization. """ import os import sys import unittes...
130
4,725
sqlmap
tests/test_entries.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Unit tests for plugins/generic/entries.py (Entries), exercising dumpTable / dumpAll / dumpFoundTables / dumpFoundColumn by MOCKING the injection layer (lib.request.inject.getValue) an...
807
30,445
sqlmap
tests/test_ldap.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Offline, deterministic tests for the LDAP injection engine. Mock oracles stand in for the HTTP/LDAP layer so detection, fingerprinting, blind inference, and output formatting can be e...
517
21,615
sqlmap
tests/test_sparql.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Offline, deterministic tests for the SPARQL injection engine. A mock oracle mirrors the boolean-blind semantics of a real triple store (a broken-out FILTER reduced to its injected pre...
385
17,536
sqlmap
tests/test_encoding.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Core text<->bytes conversions (lib/core/convert.py): getBytes, getUnicode, getText. (getOrds is covered in test_convert.py.) These are called on essentially every request and respons...
76
2,555
sqlmap
tests/test_compat.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Tests for lib/core/compat.py -- cross-version compatibility utilities, including WichmannHill RNG, patchHeaders, cmp_to_key, LooseVersion, MixedWriteTextIO, and _codecs_open. """ imp...
290
10,214
sqlmap
tests/test_kerberos.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Tests for the dependency-free Kerberos stack under extra/kerberos: the AES core (FIPS-197), the RFC 3961/3962 etype crypto (n-fold, string-to-key, authenticated encryption) and the AS...
323
15,742
sqlmap
tests/test_dbwire.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Protocol-transcript coverage for the dependency-free wire clients in extra/dbwire: PostgreSQL SCRAM server verification, MySQL capability negotiation, TDS framing and affected-row cou...
697
33,617
sqlmap
tests/test_grpcweb.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission gRPC-Web body support (lib/utils/grpcweb.py, grpc-web-text/unary). Covers the peer-review merge gate: exact round-trip, injection with length recomputation, strict framing validation ...
269
13,496
sqlmap
tests/test_option.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Option setup / normalization helpers in lib/core/option.py. These exercise the (mostly) pure config-massaging functions that parse, validate and normalize user-supplied option values...
1,651
64,193
sqlmap
tests/test_odata.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Offline, deterministic tests for the OData '$filter' injection engine. A mock oracle mirrors the boolean-blind semantics of a real OData service (a broken-out filter reduced to its in...
472
19,993
sqlmap
tests/test_nosql.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Offline, deterministic tests for the NoSQL injection engine. Mock oracles stand in for the HTTP/back-end layer so detection and blind extraction can be exercised without a live target...
958
43,579
sqlmap
tests/test_texthelpers.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Text-processing helpers in lib/core/common.py: normalizeUnicode (accent folding), filterStringValue (charset whitelist), parseFilePaths (absolute-path harvesting from error pages -> k...
90
3,674
sqlmap
tests/test_parse_modules.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Parsers under lib/parse/: DBMS banner fingerprinting (banner.py + the shared FingerprintHandler in handler.py) and the .ini configuration-file reader (configfile.py). These are pure: ...
180
6,601
sqlmap
tests/test_sqlalchemy.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission The SQLAlchemy '-d' connector wrapper (lib/utils/sqlalchemy.py). The absolute SQLite path must map to 'sqlite:///' + abspath: an extra slash yields the db '//path' (tolerated only on ...
70
2,084
sqlmap
tests/test_boolean_jitter.py
.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Adversarial "shitty response" JITTER harness for BOOLEAN-based blind extraction. Boolean-blind decides each bit through the REAL comparison() oracle (--string...
297
15,324
sqlmap
tests/test_hql.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Offline, deterministic tests for the HQL/JPQL (Hibernate ORM) injection engine. Mock oracles stand in for the HTTP/ORM layer so detection, fingerprinting, entity leakage, blind attrib...
299
12,579
sqlmap
tests/test_request_basic.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Unit coverage for PURE functions in lib/request/basic.py. These exercise getHeuristicCharEncoding (with its kb.cache.encoding memoization) and decodePage's charset + HTML-entity deco...
198
8,066
sqlmap
tests/test_ssti.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Offline tests for the SSTI detection and fingerprinting engine. Mock _send() stands in for the HTTP/Jinja2 layer so engine table integrity, arithmetic proof, error detection, boolean ...
830
37,501
sqlmap
tests/test_dialectdbms.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Operator/typing-dialect DBMS heuristic (lib/utils/dialect.py). Locks in the empirical 8-probe truth table: each measured signature maps to its expected back-end DBMS, and every other ...
208
11,412
sqlmap
tests/test_wordlist.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Wordlist iterator (lib/core/wordlist.py). Backs dictionary attacks (--common-tables, password cracking, brute force): a lazy iterator that streams words across one or more files (and...
97
2,626
sqlmap
tests/test_property.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Property/fuzz tests for the pure parsers and transforms. Where the other test files pin specific examples, these assert INVARIANTS over hundreds of randomized (but deterministic, cros...
279
12,865
sqlmap
tests/test_filesystem.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Unit coverage for the file-read/file-write/UDF-injection SQL & command builders: - plugins/generic/filesystem.py (encoding, INSERT/UPDATE query forging, ...
741
31,173
sqlmap
tests/test_comparison_json.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission D1 - structure-aware (JSON) detection oracle. Two layers: * jsonMinimize() (lib/core/common.py): the order-independent leaf-path projection. * comparison() (lib/request/comparison...
143
6,192
sqlmap
tests/test_urls.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission URL encode/decode round-trips, parameter parsing, same-host checks. """ import os import random import sys import unittest sys.path.insert(0, os.path.dirname(os.path.abspath(__file_...
81
2,813
sqlmap
tests/test_datafiles.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission Repo / data-file invariants - the cheap structural guards that catch whole bug classes seen this session: tamper contract, per-DBMS query-tag coverage, errors.xml regex compilation, X...
182
9,011
sqlmap
tests/test_union_engine.py
.py
#!/usr/bin/env python """ Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org) See the file 'LICENSE' for copying permission The UNION-based column-count detection engine (lib/techniques/union/test.py). _findUnionCharCount discovers how many columns a UNION injection needs. Its fastest path is the ORDER BY...
189
7,994