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 | tests/test_payload_marking.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Request-body injection-point handling:
- recognition regexes (REAL, imported from settings) classify JSON/JSON_LIKE/XML/PLAIN
- JSON/XML injection-point marking preserves every valu... | 277 | 11,215 |
sqlmap | tests/test_serialize.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Exhaustive lock on the safe (JSON-based, no code execution) serializer that backs the
session store (HashDB) and BigArray disk chunks - the replacement for the former
code-executing s... | 463 | 20,504 |
sqlmap | tests/test_techniques.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Mocked-oracle / canned-input coverage for the self-contained extraction /
inference engines under lib/techniques/*:
* lib/techniques/union/use.py - _oneShotUnionUse / unionU... | 1,794 | 81,952 |
sqlmap | tests/test_sqllint.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Unit tests + atom-level SQL coverage for lib/utils/sqllint.py.
Two concerns:
1. Linter self-test - a curated set of well-formed fragments/statements that
must NOT flag, malfo... | 208 | 10,615 |
sqlmap | tests/test_dump_jsonl.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
JSONL output of the per-table dumper (Dump.dbTableValues in lib/core/dump.py).
--dump-format=JSONL writes one self-describing JSON object per row to a
<host>/dump/<db>/<table>.jsonl ... | 172 | 7,351 |
sqlmap | tests/test_target_parsing.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Target-environment setup in lib/core/target.py.
target.py wires a single scan's per-host state together: it derives the output /
dump / files directories from the hostname, opens (an... | 536 | 19,393 |
sqlmap | tests/test_hashdb.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Session storage layer (lib/utils/hashdb.py) - the on-disk SQLite cache that
makes --flush-session / resume work.
Exercised against a REAL temporary SQLite file (no network, no DBMS):... | 154 | 5,728 |
sqlmap | tests/test_xslt.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 XSLT injection engine (lib/techniques/xslt/inject.py) and the XQuery tier the XPath
engine gained (lib/techniques/xpath/inject.py).
Network-free: the payload builder... | 314 | 16,225 |
sqlmap | tests/test_generic_takeover.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 generic plugin mixins covering:
* plugins/generic/custom.py - sqlQuery SELECT/non-query/stacked branches, the
MSSQL FROM rewrite, METADB suffix stripping, ... | 606 | 21,302 |
sqlmap | tests/test_timeless.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 HTTP/2 timeless-timing oracle in lib/request/timeless.py: the
sequential decision engine that turns response-order votes into bits, the pair
transport's replay-safety... | 436 | 20,285 |
sqlmap | tests/test_error_engine.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
The error-based extraction engine (lib/techniques/error/use.py _oneShotErrorUse).
Error-based SQLi coaxes the DBMS into emitting the target value inside an error
message, wrapped bet... | 235 | 11,417 |
sqlmap | tests/test_gui_helpers.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Parser-introspection helpers in lib/utils/gui.py. The GUI itself needs a live
display (Tk), so it is excluded from the smoke test and never imported there;
these module-level helpers,... | 119 | 4,386 |
sqlmap | tests/test_wafbypass.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
T1 - automatic WAF-bypass tamper selection (lib/utils/wafbypass.py). These cover the pure,
offline pieces: the identYwaf blind-signature decoder (which provocation vectors a known WAF... | 82 | 3,455 |
sqlmap | tests/test_search_enum.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/search.py (Search), exercising searchDb /
searchTable / searchColumn by MOCKING the injection layer
(lib.request.inject.getValue) and the dumper.
No ne... | 586 | 22,410 |
sqlmap | tests/test_graphql.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 GraphQL injection engine. Mock oracles stand in for the
HTTP/GraphQL layer so endpoint detection, introspection parsing, slot enumeration, query
c... | 1,004 | 46,892 |
sqlmap | tests/test_replication.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
SQLite replication writer (lib/core/replication.py).
This is what backs `--dump ... --dump-format SQLITE` / replication: it mirrors
dumped tables into a local SQLite file. Tested end... | 122 | 4,672 |
sqlmap | tests/test_sgmllib.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/utils/sgmllib.py -- the SGML/HTML parser used internally by
sqlmap for page content analysis. Exercises the parser with valid SGML/HTML
constructs and verifies the event... | 279 | 9,197 |
sqlmap | tests/test_brute.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 lib/utils/brute.py.
tableExists / columnExists are driven with conf.direct=True and the external
collaborators (inject.checkBooleanExpression, getFileItems, runThre... | 224 | 9,261 |
sqlmap | tests/test_esperanto.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
Regression suite for the DBMS-agnostic engine (extra/esperanto/), in two parts:
1. Semantic corpus - round-trips awkward values through an in-memory SQLite bo... | 1,096 | 54,697 |
sqlmap | tests/test_jwt.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 JWT auditor: the dependency-free codec/crypto helpers in lib/utils/jwt.py
(parse/forge/crack/audit/detect) and the active scan engine in lib/techniques/jwt/injec... | 236 | 11,349 |
sqlmap | tests/test_dialect.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Per-DBMS query building (the injection-engine "dialect" layer).
These pin the exact SQL that agent.* emits for each back-end. They are the
regression net for queries.xml edits and fo... | 113 | 4,415 |
sqlmap | tests/test_bigarray.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
BigArray disk-spill semantics (lib/core/bigarray.py).
BigArray is the structure that lets sqlmap dump tables far larger than RAM: once
the in-memory chunk exceeds chunk_size it is pi... | 167 | 6,189 |
sqlmap | tests/test_cloak.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
cloak / decloak (extra/cloak/cloak.py) - the zlib+XOR transform used to pack the
payload stager files (.py_) that sqlmap drops and unpacks on a target during
takeover/file-write. A br... | 68 | 2,381 |
sqlmap | tests/test_crawler.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Crawler result normalization (lib/utils/crawler.py normalizeCrawlingResults).
--crawl can surface thousands of near-identical URLs; normalization keeps one
representative per distinc... | 66 | 2,691 |
sqlmap | tests/test_websocket.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 PURE (network-free) parts of the native WebSocket client in
lib/request/websocket.py: the RFC 6455 accept-key computation, client frame masking,
the length-encod... | 139 | 4,859 |
sqlmap | tests/test_agent.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Consolidated unit coverage for lib/core/agent.py.
This file merges the agent.py tests previously spread across
test_agent.py, test_agent_dialects.py, test_core_more.py and
test_core_... | 791 | 32,139 |
sqlmap | tests/test_databases_enum.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 enumeration methods of plugins/generic/databases.py.
The injection layer (lib.request.inject.getValue) is mocked so no network or
live DBMS is required; each test ... | 774 | 28,267 |
sqlmap | tests/test_convert.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
Encoding / decoding / serialization round-trips and known vectors.
Covers: hex, base64 (std + url-safe), DBMS hex decode, byte<->text conversion,
JSON (de)seri... | 141 | 6,061 |
sqlmap | tests/test_library.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 library facade (import sqlmap; sqlmap.scan(...)).
The facade drives the engine out-of-process through a generated configuration file (the same '-c'
mechanism th... | 147 | 6,369 |
sqlmap | tests/test_reflection.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Adversarial coverage for reflection removal.
Two independent mechanisms exist and the non-SQL engines rely on BOTH:
lib.core.common.removeReflectiveValues - the scan-wide heurist... | 193 | 8,598 |
sqlmap | tests/test_openapi_drift.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Contract test: the OpenAPI spec (sqlmapapi.yaml) must stay in lock-step with the
REST API actually served by lib/utils/api.py. The spec is hand-maintained, so it
is the exact thing th... | 115 | 4,139 |
sqlmap | tests/test_progress.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
The textual progress bar (lib/utils/progress.py) used during multi-item
extraction. Pure rendering/clamping logic plus ETA formatting.
"""
import os
import re
import sys
import time
... | 210 | 8,511 |
sqlmap | tests/test_deps.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Optional-dependency probe (lib/utils/deps.py, the --dependencies feature).
checkDependencies() attempts to import every supported DBMS driver and warns
on the ones missing; it must ne... | 117 | 3,899 |
sqlmap | tests/test_profiling.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Switch '--profile' (lib/core/profiling.py). The profiled statement must resolve
'start' from an explicit namespace: on pip installs __main__ is the console
script, not sqlmap.py, so r... | 60 | 1,823 |
sqlmap | tests/test_strings.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
String / path / escape helpers.
"""
import os
import random
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from _testutils import bootstra... | 115 | 4,683 |
sqlmap | tests/test_har.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/utils/har.py -- HAR (HTTP Archive) collector and HTTP
request/response parsing used by sqlmap's --har-file feature.
"""
import os
import sys
import unittest
sys.path.i... | 202 | 8,348 |
sqlmap | tests/test_pagecontent.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Page-content extraction helpers (lib/core/common.py): getFilteredPageContent,
getPageWordSet, extractTextTagContent, and parseSqliteTableSchema.
The first three feed text-only compar... | 94 | 3,769 |
sqlmap | tests/test_fingerprint.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
DBMS version/fork fingerprinting (plugins/dbms/<dbms>/fingerprint.py). Each
plugin's getFingerprint()/checkDbms() probes the backend with a cascade of
boolean expressions (inject.chec... | 214 | 10,187 |
sqlmap | tests/test_inference_engine.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
The blind-SQLi extraction engine (lib/techniques/blind/inference.py bisection).
This is the actual algorithm that pulls data out one character at a time over a
boolean/blind oracle -... | 214 | 9,741 |
sqlmap | tests/test_payloads_structure.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Structural invariants of the injection payload/boundary definitions
(data/xml/payloads/*.xml -> conf.tests, data/xml/boundaries.xml -> conf.boundaries).
These XML files ARE the detec... | 131 | 5,751 |
sqlmap | tests/test_xpath.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 XPath injection engine. Mock oracles stand in for the
HTTP/lxml layer so detection, fingerprinting, blind inference, payload building, and output
... | 560 | 24,167 |
sqlmap | tests/test_dns_server.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
The DNS server used for DNS-exfiltration (lib/request/dns.py): raw packet parsing
(DNSQuery), fake A-record response crafting, the pop(prefix, suffix) accounting, and
- importantly - ... | 366 | 14,227 |
sqlmap | tests/test_heuristic_signatures.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Cross-engine invariants of the non-SQL heuristic signatures in lib/core/settings.py.
heuristicCheckSqlInjection() tries every one of these regexes against the same response and print... | 235 | 16,415 |
sqlmap | tests/test_safe2bin.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
safecharencode / safechardecode (lib/utils/safe2bin.py).
These make extracted DB values safe to print/store by escaping control and
non-printable characters (tab -> \\t, NUL -> \\x00... | 61 | 1,974 |
sqlmap | tests/test_comparison.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
The true/false/None response oracle (lib/request/comparison.py).
The seqMatcher ratio path needs a live page template and is intentionally left
to --vuln. What IS pure and worth pinn... | 133 | 4,257 |
sqlmap | tests/test_dns_engine.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
The DNS-exfiltration extraction engine (lib/techniques/dns/use.py dnsUse) and the
channel-detection probe (lib/techniques/dns/test.py dnsTest).
DNS exfil is normally driven by a back... | 403 | 18,957 |
sqlmap | tests/test_decorators.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Function decorators in lib/core/decorators.py: cachedmethod (memoization with a
hashable fast path and a frozen slow path for unhashable arguments), stackedmethod
(value-stack realign... | 94 | 2,770 |
sqlmap | tests/test_keyset_engine.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
The keyset (seek) pagination dump engine (lib/utils/keysetdump.py).
Large tables are dumped one row at a time by seeking on an indexed cursor (a
row-id or the primary key). For a COM... | 110 | 4,428 |
sqlmap | tests/test_decodepage.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
HTTP response decoding (lib/request/basic.py decodePage).
Every fetched page passes through decodePage: it inflates gzip/deflate bodies,
applies the charset, ... | 122 | 4,757 |
sqlmap | tests/test_hash.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Password-hashing primitives (lib/utils/hash.py) used by the dictionary-attack
cracker (-? / --passwords). These are pure functions; correctness here is what
makes a cracked password a... | 140 | 5,799 |
sqlmap | tests/test_jitter_stress.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Adversarial JITTER stress harness for time-based blind extraction.
Drives the REAL bisection() + REAL wasLastResponseDelayed() + REAL validateChar() re-validation
against a mock orac... | 290 | 14,363 |
sqlmap | tests/test_threads.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Threading helpers in lib/core/threads.py: the thread-local data model,
current-thread accessors, the exception-isolating wrapper, and runThreads()
(the worker-pool driver used through... | 173 | 5,888 |
sqlmap | tests/test_openapi.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 OpenAPI/Swagger target extractor (lib/parse/openapi.py): schema example
synthesis, $ref resolution (incl. cycles), base-URL resolution (v2 + v3, relative/templat... | 484 | 30,177 |
sqlmap | tests/test_dump_format.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Output formatting of the result dumper (lib/core/dump.py) and the SQLite
replication backend (lib/core/replication.py).
dump.Dump turns extracted DB structures (schemas, table/column... | 470 | 19,831 |
sqlmap | tests/test_tamper.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Tamper scripts (all ~70): contract, robustness on a payload battery, known
transforms, and documented fragile cases.
NOTE (flagged for author - real minor bugs surfaced by this suite... | 183 | 8,550 |
sqlmap | tests/test_hash_crack.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Dictionary-attack machinery in lib/utils/hash.py (the cracking loop, hash-file
parsing, result storage and table/cache post-processing) - the part NOT covered
by tests/test_hash.py, w... | 233 | 8,697 |
sqlmap | tests/test_identifiers_output.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Identifier quoting per DBMS dialect, CSV value escaping, and dump value
replacement markers.
"""
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.absp... | 90 | 3,648 |
sqlmap | tests/test_datatypes.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Core data structures: AttribDict, OrderedSet, LRUDict, BigArray.
"""
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from _testut... | 97 | 2,686 |
sqlmap | tests/test_users_enum.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 enumeration methods of plugins/generic/users.py.
The injection layer (lib.request.inject.getValue) is mocked so the methods can
be exercised against canned result ... | 512 | 20,626 |
sqlmap | tests/test_xxe.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 XXE injection engine. Pure helpers are exercised
directly; detection tiers run against a mocked _send() so reflected/error/echo oracles
can be sim... | 519 | 23,484 |
sqlmap | tests/test_common.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Consolidated unit coverage for lib/core/common.py.
This module merges the previously separate test_common_utils.py,
test_common_parsers.py and the common.py-specific classes from
tes... | 1,793 | 68,341 |
sqlmap | tests/test_utils.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Core utility helpers: constant-time compare, numeric checks, safe formatting,
list/value normalization, randomness generators.
"""
import os
import sys
import unittest
sys.path.inse... | 118 | 4,905 |
sqlmap | tests/test_charset.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Response charset / meta detection and parameter parsing.
checkCharEncoding canonicalizes the encoding sqlmap will decode a page with;
META_CHARSET_REGEX / HTML_TITLE_REGEX / META_REF... | 105 | 4,730 |
sqlmap | tests/_testutils.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Shared bootstrap for the sqlmap unit/regression test suite.
Brings sqlmap's global state (conf/kb, the 'reversible' codec, cross-references,
option defaults) up far enough that pure/... | 209 | 8,660 |
sqlmap | tests/test_checks.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 lib/controller/checks.py driven with a MOCKED HTTP layer.
checks.py is the injection-detection controller; almost everything in it goes
through the network seam (lib.r... | 501 | 21,238 |
sqlmap | tests/test_dicts.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Structural invariants of the data-mapping tables in lib/core/dicts.py.
These tables drive DBMS recognition, connector selection, dummy-table dialect,
and dump formatting. They are pu... | 89 | 3,842 |
sqlmap | tests/test_common_helpers.py | .py | #!/usr/bin/env python
"""
Copyright (c) 2006-2026 sqlmap developers (https://sqlmap.org)
See the file 'LICENSE' for copying permission
Assorted request-shaping helpers in lib/core/common.py:
chunkSplitPostData (HTTP chunked-transfer evasion), randomizeParameterValue
(tamper/cache-buster), getHostHeader (Host header d... | 76 | 2,690 |
sqlmap | thirdparty/termcolor/termcolor.py | .py | # coding: utf-8
# Copyright (c) 2008-2011 Volvox Development Team
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy... | 174 | 5,246 |
sqlmap | thirdparty/chardet/charsetprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | 146 | 5,110 |
sqlmap | thirdparty/chardet/chardistribution.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 234 | 9,411 |
sqlmap | thirdparty/chardet/charsetgroupprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 108 | 3,839 |
sqlmap | thirdparty/chardet/big5freq.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 387 | 31,254 |
sqlmap | thirdparty/chardet/sbcharsetprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | 146 | 6,136 |
sqlmap | thirdparty/chardet/langhebrewmodel.py | .py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
HEBREW_LANG_MODEL = {
50: { # 'a'
50: 0, # 'a'
60: 1, # 'c'
61: 1, # 'd'
42: 1, # 'e'
53: 1, # 'i'
56: 2, ... | 4,384 | 98,757 |
sqlmap | thirdparty/chardet/hebrewprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... | 293 | 13,838 |
sqlmap | thirdparty/chardet/latin1prober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | 146 | 5,370 |
sqlmap | thirdparty/chardet/codingstatemachine.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | 89 | 3,590 |
sqlmap | thirdparty/chardet/__init__.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ve... | 84 | 3,271 |
sqlmap | thirdparty/chardet/sjisprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | 93 | 3,774 |
sqlmap | thirdparty/chardet/universaldetector.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | 287 | 12,503 |
sqlmap | thirdparty/chardet/langrussianmodel.py | .py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
RUSSIAN_LANG_MODEL = {
37: { # 'А'
37: 0, # 'А'
44: 1, # 'Б'
33: 1, # 'В'
46: 1, # 'Г'
41: 1, # 'Д'
48: 1,... | 5,719 | 131,161 |
sqlmap | thirdparty/chardet/eucjpprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | 93 | 3,749 |
sqlmap | thirdparty/chardet/langbulgarianmodel.py | .py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
BULGARIAN_LANG_MODEL = {
63: { # 'e'
63: 1, # 'e'
45: 0, # '\xad'
31: 0, # 'А'
32: 0, # 'Б'
35: 0, # 'В'
4... | 4,651 | 105,678 |
sqlmap | thirdparty/chardet/version.py | .py | """
This module exists only to simplify retrieving the version number of chardet
from within setup.py and from chardet subpackages.
:author: Dan Blanchard (dan.blanchard@gmail.com)
"""
__version__ = "4.0.0"
VERSION = __version__.split('.')
| 10 | 242 |
sqlmap | thirdparty/chardet/mbcharsetprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | 92 | 3,413 |
sqlmap | thirdparty/chardet/langturkishmodel.py | .py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
TURKISH_LANG_MODEL = {
23: { # 'A'
23: 0, # 'A'
37: 0, # 'B'
47: 0, # 'C'
39: 0, # 'D'
29: 0, # 'E'
52: 0,... | 4,384 | 95,927 |
sqlmap | thirdparty/chardet/sbcsgroupprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | 84 | 4,309 |
sqlmap | thirdparty/chardet/enums.py | .py | """
All of the Enums that are used throughout the chardet package.
:author: Dan Blanchard (dan.blanchard@gmail.com)
"""
class InputState(object):
"""
This enum represents the different states a universal detector can be in.
"""
PURE_ASCII = 0
ESC_ASCII = 1
HIGH_BYTE = 2
class LanguageFilter... | 77 | 1,661 |
sqlmap | thirdparty/chardet/utf8prober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | 83 | 2,766 |
sqlmap | thirdparty/chardet/escprober.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | 102 | 3,950 |
sqlmap | thirdparty/chardet/euckrfreq.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 196 | 13,546 |
sqlmap | thirdparty/chardet/escsm.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | 247 | 10,510 |
sqlmap | thirdparty/chardet/mbcssm.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | 573 | 25,481 |
sqlmap | thirdparty/chardet/jisfreq.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 326 | 25,777 |
sqlmap | thirdparty/chardet/jpcntx.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 234 | 19,643 |
sqlmap | thirdparty/chardet/compat.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Dan Blanchard
# Ian Cordasco
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# versi... | 37 | 1,200 |
sqlmap | thirdparty/chardet/gb2312freq.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 284 | 20,715 |
sqlmap | thirdparty/chardet/langthaimodel.py | .py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
THAI_LANG_MODEL = {
5: { # 'ก'
5: 2, # 'ก'
30: 2, # 'ข'
24: 2, # 'ค'
8: 2, # 'ง'
26: 2, # 'จ'
52: 0, # 'ฉ... | 4,384 | 103,293 |
sqlmap | thirdparty/chardet/langhungarianmodel.py | .py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from .sbcharsetprober import SingleByteCharSetModel
# 3: Positive
# 2: Likely
# 1: Unlikely
# 0: Negative
HUNGARIAN_LANG_MODEL = {
28: { # 'A'
28: 0, # 'A'
40: 1, # 'B'
54: 1, # 'C'
45: 2, # 'D'
32: 1, # 'E'
50: ... | 4,651 | 102,479 |
sqlmap | thirdparty/chardet/euctwfreq.py | .py | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | 388 | 31,621 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.