Skip to main content

sqlidps

PyPI version PyPI downloads Build License Platform Wheel code style Python version

SQL Injection - Detection and Prevention System

SQLIDPS is a tool designed to detect and prevent SQL injection attacks in web applications. SQL injection is a common attack vector that allows attackers to execute arbitrary SQL code on a database, potentially leading to data breaches and other security issues. This project aims to provide a robust solution for identifying and mitigating such vulnerabilities.

Flow Chart

The data flow in SQLIDPS illustrates how user inputs are processed to detect and prevent SQL injection attacks.
Below is a detailed visualization of the flow:

Flowchart

📚 For more detailed documentation, visit deepwiki docs.

🚀 Performance Benchmark

🛡️ SQL Injection Check Time: 0.8ms per input

Usage

SQLi.check(data)

Checks if the provided data contains potential SQLi payloads. Raises PotentialSQLiPayload if a malicious input is detected.

  • Arguments:

    • data (str | list | dict): Input to be checked.
  • Example:

from sqlidps import SQLi

try:
    SQLi.check("SELECT * FROM users WHERE '1'='1' --")
except PotentialSQLiPayload as e:
    print("Blocked:", e)

SQLi.parse(data: dict, error="potential payload") → dict

Parses a dictionary and replaces any malicious values with a safe error string instead of raising an exception.

  • Arguments:

    • data (dict): Dictionary to scan.
    • error (str): Replacement string for detected payloads (default: "potential payload").
  • Returns:

    • A cleaned dictionary with malicious values replaced.
  • Example:

data = {
    "username": "admin",
    "password": "' OR '1'='1"
}

cleaned = SQLi.parse(data)
print(cleaned)
# Output: {'username': 'admin', 'password': 'potential payload'}

Installing

pip install sqlidps

Build from Source

cd sqlidps
pip install -r requirements.txt
flex -o sqlidps/lex.yy.c sqlidps/lexer.l
make sqlidps && make sqlidps clean
python sqlidps/train.py
pip install .

Metadata

Release files for sqlidps 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlidps 1.2.2
File Size Uploaded Provenance
sqlidps-1.2.2.tar.gz 1.0 MB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for sqlidps 1.2.2
File
sqlidps-1.2.2-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
sqlidps-1.2.2-cp314-cp314-manylinux1_x86_64.manylinux_2_5_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.5+ x86-64 Details
sqlidps-1.2.2-cp314-cp314-macosx_11_0_universal2.whl CPython 3.14 CPython 3.14 macOS 11.0+ universal2 (ARM64, x86-64) Details
sqlidps-1.2.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
sqlidps-1.2.2-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.5+ x86-64 Details
sqlidps-1.2.2-cp313-cp313-macosx_10_13_universal2.whl CPython 3.13 CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) Details
sqlidps-1.2.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
sqlidps-1.2.2-cp312-cp312-manylinux1_x86_64.manylinux_2_5_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.5+ x86-64 Details
sqlidps-1.2.2-cp312-cp312-macosx_10_13_universal2.whl CPython 3.12 CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) Details
sqlidps-1.2.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
sqlidps-1.2.2-cp311-cp311-manylinux1_x86_64.manylinux_2_5_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.5+ x86-64 Details
sqlidps-1.2.2-cp311-cp311-macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) Details
sqlidps-1.2.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
sqlidps-1.2.2-cp310-cp310-manylinux1_x86_64.manylinux_2_5_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.5+ x86-64 Details
sqlidps-1.2.2-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details
sqlidps-1.2.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
sqlidps-1.2.2-cp39-cp39-manylinux1_x86_64.manylinux_2_5_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
sqlidps-1.2.2-cp39-cp39-macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) Details
sqlidps-1.2.2-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
sqlidps-1.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
sqlidps-1.2.2-cp38-cp38-macosx_11_0_universal2.whl CPython 3.8 CPython 3.8 macOS 11.0+ universal2 (ARM64, x86-64) Details

Total release size: 24.2 MB

Release files / sqlidps-1.2.2.tar.gz

Download URL sqlidps-1.2.2.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
fae16e70e5fc7b7d28bb985a51abf1c79fa02284cd6955d1401b985f832359a7
BLAKE2b-256 checksum
How to use checksums
813bb8db03d109777b6a38ef32e743191946fcc3ae4bd80785f81a135be23f61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp314-cp314-win_amd64.whl

Download URL sqlidps-1.2.2-cp314-cp314-win_amd64.whl
Size 1.1 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
7cfbf164c602ff863ca6d4c5ac73af9b41f99c478436ff40a6a836640fb7ca7a
BLAKE2b-256 checksum
How to use checksums
ef622de57fadd4d28817905ae2cf9702e28f852c1381f2d7a65f4c7e5843dc4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp314-cp314-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL sqlidps-1.2.2-cp314-cp314-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 1.1 MB
Tags CPython 3.14 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
4cd73bd035ebacb61f476cca0d521b47a5030a627f1ae6b23813e1dd2493f051
BLAKE2b-256 checksum
How to use checksums
62d6e3f96fcbc2fc16218f4a164255478c1502c0e3dba754a14cd41583f4c03b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp314-cp314-macosx_11_0_universal2.whl

Download URL sqlidps-1.2.2-cp314-cp314-macosx_11_0_universal2.whl
Size 1.1 MB
Tags CPython 3.14 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
d48a56a862d3dc888211e6820820f53ab4f216ba28ce38a8921e126e1b6e8861
BLAKE2b-256 checksum
How to use checksums
28e281039f503ccc58706b854b9f91cf3938b1e2bebedca6e0e5580fd4634b12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp313-cp313-win_amd64.whl

Download URL sqlidps-1.2.2-cp313-cp313-win_amd64.whl
Size 1.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
563340cd5631d6fb1fac290b595a8976d6912d7e6c65b2561b7e1cfb71823f20
BLAKE2b-256 checksum
How to use checksums
00c6561b03f2ad1818769049daab2227022ae009be9e5cb96b0bf69ba007ecd1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL sqlidps-1.2.2-cp313-cp313-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 1.1 MB
Tags CPython 3.13 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
4256441e4d997f9b27dfd92b011f7cd2d91cb4b90bf8afec61898d6c80a0f8e8
BLAKE2b-256 checksum
How to use checksums
d00567032eedf68384f42a5658ac0a44d41bc6e76c339aa2841c4294e88b7c04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp313-cp313-macosx_10_13_universal2.whl

Download URL sqlidps-1.2.2-cp313-cp313-macosx_10_13_universal2.whl
Size 1.1 MB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
4a45acc18971ed9b9e2307b0ba73128d26e5bb1b7b8f4f626efc4474144d2192
BLAKE2b-256 checksum
How to use checksums
f97cec3058dc28883fa36a81f3bfd4a34849cd776a80fd2ec4442622a7550fe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp312-cp312-win_amd64.whl

Download URL sqlidps-1.2.2-cp312-cp312-win_amd64.whl
Size 1.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c97520367ed178a48053dd299d7025715fbd4ea2022a2386274425b59337531f
BLAKE2b-256 checksum
How to use checksums
aacb1da94e99a23b76ef483d705845055ec3a11fcd789b71fa888d2d730fe48c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp312-cp312-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL sqlidps-1.2.2-cp312-cp312-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
76b970fa6450c3e429d4e1475af9987d1e614117c04b33d1e4686d7393390167
BLAKE2b-256 checksum
How to use checksums
55deafb90a272b8a6c0099a6eaf351e657c7310a33d334ecfd5fd6a0152e2b0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp312-cp312-macosx_10_13_universal2.whl

Download URL sqlidps-1.2.2-cp312-cp312-macosx_10_13_universal2.whl
Size 1.1 MB
Tags CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
fef6b777faac9d86260a56a1cc6eb30f982ab3fa1092f0eede79cd2d081d512c
BLAKE2b-256 checksum
How to use checksums
f36d9adbc9667f4186415150a70bfd3e84056bf66d80902090669295c142934b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp311-cp311-win_amd64.whl

Download URL sqlidps-1.2.2-cp311-cp311-win_amd64.whl
Size 1.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
2d1edc24fabbf61948ef943caedb4819160cd0e33ad3e92212ea2e0db60e96ef
BLAKE2b-256 checksum
How to use checksums
db7840bf12ada09ae7500e9618dd4caa6d2b143067e473e1dabc4bd7bc56b8c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp311-cp311-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL sqlidps-1.2.2-cp311-cp311-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 1.1 MB
Tags CPython 3.11 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
38379aba46ef688cb519d292b4050604f5e3fb133bfa3f853b0cb64120577ffe
BLAKE2b-256 checksum
How to use checksums
80403afe44d37f68e2fdecbefb7e5428b74693eae7d56ed91c2c5cd3b80d6dba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp311-cp311-macosx_10_9_universal2.whl

Download URL sqlidps-1.2.2-cp311-cp311-macosx_10_9_universal2.whl
Size 1.1 MB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
7e36f4c29a56d8efe01e4cf37034479ef0a5396acce85e9a5307acf447381eeb
BLAKE2b-256 checksum
How to use checksums
891d912167deb43cf7d5fcb8e3d9686dfacb7e8812bc64f57f8e10e5cd039633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp310-cp310-win_amd64.whl

Download URL sqlidps-1.2.2-cp310-cp310-win_amd64.whl
Size 1.1 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
98f5fbe97ec8ae2898bc677873643bbc5b3d99ddfa4e2aa996aef4f57a9a5563
BLAKE2b-256 checksum
How to use checksums
fe4cca0948556c659560fe8e2b1db1c1f5fcdd97cafcbdf991c25825d4cdd35e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp310-cp310-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL sqlidps-1.2.2-cp310-cp310-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
f58b32a71c54f9596d8e2e9826830756bf7dd0a60f0b19d068263caf0ea668b6
BLAKE2b-256 checksum
How to use checksums
3e155bf0536d16c4d420af8e023f3259b23f63b94dddbf4d65fe5dab044bdcd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp310-cp310-macosx_10_9_universal2.whl

Download URL sqlidps-1.2.2-cp310-cp310-macosx_10_9_universal2.whl
Size 1.1 MB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
85182d9be72f6cb0bf51014870f1ad85bb82df1a67303b34b275f7005b7430f3
BLAKE2b-256 checksum
How to use checksums
023f5db452f291c960c5a3cbd576182df1b0e58fee5e17c522c9cab04187720e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp39-cp39-win_amd64.whl

Download URL sqlidps-1.2.2-cp39-cp39-win_amd64.whl
Size 1.1 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
937db1cbae654a2c6627051d684b4ba87df5e1878d82faec47a427dcd2ef76d5
BLAKE2b-256 checksum
How to use checksums
8b63e275a06f7a15e06d4903c29d206ea0fa913611f2c251cad53b95f2e124eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp39-cp39-manylinux1_x86_64.manylinux_2_5_x86_64.whl

Download URL sqlidps-1.2.2-cp39-cp39-manylinux1_x86_64.manylinux_2_5_x86_64.whl
Size 1.1 MB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
0907ccc4c88f88d9869886062a6f7d252721296e102aca3fc1726ea8d56a001a
BLAKE2b-256 checksum
How to use checksums
e76aa2cb5d6c32c5568efff34a84ef62b51312510b2025aa92443d8a1291e9e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp39-cp39-macosx_10_9_universal2.whl

Download URL sqlidps-1.2.2-cp39-cp39-macosx_10_9_universal2.whl
Size 1.1 MB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
89f7fcce989a46eb9f6c7c1011974e7d3cf52d0654089f9a5f356e72ffcf04b0
BLAKE2b-256 checksum
How to use checksums
311f9681667ffe62a7554a2449bccf71f976072c4d97f8ea558b80b875aa691d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp38-cp38-win_amd64.whl

Download URL sqlidps-1.2.2-cp38-cp38-win_amd64.whl
Size 1.1 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
9e5bc241c51fc7214a8940a9c21f90d3b0c01ee907555d1c88ff4377f97e6386
BLAKE2b-256 checksum
How to use checksums
bdefeb28dea3aa1b4836bf5efaa12f6b1f20e8c5959dbc9599c587c6b8d70cfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL sqlidps-1.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.1 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
7a9385e66eba162fcd0cc9c4039f816491e2073bb8c3908ed6888e8c35d60c38
BLAKE2b-256 checksum
How to use checksums
fd49e93afd10cf363328c5754efcdd52796f1a425a329a0e6b0c821e5845e8b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / sqlidps-1.2.2-cp38-cp38-macosx_11_0_universal2.whl

Download URL sqlidps-1.2.2-cp38-cp38-macosx_11_0_universal2.whl
Size 1.1 MB
Tags CPython 3.8 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
160b3cc4f366b4664b5fe806e7332546d6f119b2d43d2cc912cddb4a028bc2bd
BLAKE2b-256 checksum
How to use checksums
3aa71a4c91a53430a00961a2a68e8e7c6b77b87a8d3fee6f67964eacfc756a10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for sqlidps 1.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page