QDraco


NameQDraco JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/qaisdraco/qaisdraco
SummaryA library for validating user inputs to prevent common security vulnerabilities.
upload_time2024-08-17 06:19:06
maintainerNone
docs_urlNone
authorQais Abou Shaheen
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # QDraco

QDraco is a Python library designed to validate user inputs against common security vulnerabilities. This library helps in preventing various types of attacks such as SQL Injection, Cross-Site Scripting (XSS), Command Injection, Path Traversal, and others. It is a valuable tool for developers looking to enhance the security of their applications by validating potentially malicious inputs.


## Features

SQL Injection Prevention: Detects and prevents SQL injection attempts.
XSS (Cross-Site Scripting) Prevention: Identifies and blocks XSS attack patterns.
Command Injection Prevention: Protects against shell command injections.
Path Traversal Prevention: Safeguards against attempts to access unauthorized files and directories.
Remote and Local File Inclusion (RFI/LFI) Prevention: Blocks attempts to include remote or local files.
Remote Code Execution (RCE) Prevention: Detects patterns that could lead to code execution on the server.
Open Redirect Prevention: Prevents open redirect attacks.
CSRF (Cross-Site Request Forgery) Prevention: Identifies potential CSRF attack vectors.





## Installation
To install QDraco, you can use pip:

```bash
pip install QDraco
```

### Usage


Here is an example of how to use QDraco to validate different types of user inputs:

```python
from QDraco import InputValidator

validator = InputValidator()

# Example inputs to validate
sql_input = "SELECT * FROM users WHERE id = 1"
xss_input = '<script>alert("XSS")</script>'
command_input = "rm -rf /"
path_input = "../../etc/passwd"
csrf_input = '<form action="submit.php" method="post"><input type="hidden" name="csrf_token" value="..."></form>'
rfi_input = "http://example.com/shell.txt"
lfi_input = "../../../../../etc/passwd"
rce_input = "system('ls');"
open_redirect_input = "window.location='http://evil.com';"

# Validate inputs
print("SQL Injection Safe:", validator.validate_sql_input(sql_input))
print("XSS Safe:", validator.validate_html_input(xss_input))
print("Command Injection Safe:", validator.validate_command_input(command_input))
print("Path Traversal Safe:", validator.validate_path_traversal(path_input))
print("CSRF Safe:", validator.validate_csrf_input(csrf_input))
print("RFI Safe:", validator.validate_rfi_input(rfi_input))
print("LFI Safe:", validator.validate_lfi_input(lfi_input))
print("RCE Safe:", validator.validate_rce_input(rce_input))
print("Open Redirect Safe:", validator.validate_open_redirect_input(open_redirect_input))

```


### License


This project is licensed under the MIT License. See the LICENSE file for more details.

### Contact

If you have any questions or feedback, please feel free to reach out.

### Contributing

Contributions to QDraco are welcome! Whether it's a bug report, new feature, correction, or any other type of contribution, please feel free to open an issue or submit a pull request on the GitHub repository.




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/qaisdraco/qaisdraco",
    "name": "QDraco",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Qais Abou Shaheen",
    "author_email": "qaisabushahin@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/50/81/d6d8946b5a12138a8451b2c89e7ce73db3c2e94e5179d8ae32cf85e6d5ea/QDraco-0.1.tar.gz",
    "platform": null,
    "description": "# QDraco\r\n\r\nQDraco is a Python library designed to validate user inputs against common security vulnerabilities. This library helps in preventing various types of attacks such as SQL Injection, Cross-Site Scripting (XSS), Command Injection, Path Traversal, and others. It is a valuable tool for developers looking to enhance the security of their applications by validating potentially malicious inputs.\r\n\r\n\r\n## Features\r\n\r\nSQL Injection Prevention: Detects and prevents SQL injection attempts.\r\nXSS (Cross-Site Scripting) Prevention: Identifies and blocks XSS attack patterns.\r\nCommand Injection Prevention: Protects against shell command injections.\r\nPath Traversal Prevention: Safeguards against attempts to access unauthorized files and directories.\r\nRemote and Local File Inclusion (RFI/LFI) Prevention: Blocks attempts to include remote or local files.\r\nRemote Code Execution (RCE) Prevention: Detects patterns that could lead to code execution on the server.\r\nOpen Redirect Prevention: Prevents open redirect attacks.\r\nCSRF (Cross-Site Request Forgery) Prevention: Identifies potential CSRF attack vectors.\r\n\r\n\r\n\r\n\r\n\r\n## Installation\r\nTo install QDraco, you can use pip:\r\n\r\n```bash\r\npip install QDraco\r\n```\r\n\r\n### Usage\r\n\r\n\r\nHere is an example of how to use QDraco to validate different types of user inputs:\r\n\r\n```python\r\nfrom QDraco import InputValidator\r\n\r\nvalidator = InputValidator()\r\n\r\n# Example inputs to validate\r\nsql_input = \"SELECT * FROM users WHERE id = 1\"\r\nxss_input = '<script>alert(\"XSS\")</script>'\r\ncommand_input = \"rm -rf /\"\r\npath_input = \"../../etc/passwd\"\r\ncsrf_input = '<form action=\"submit.php\" method=\"post\"><input type=\"hidden\" name=\"csrf_token\" value=\"...\"></form>'\r\nrfi_input = \"http://example.com/shell.txt\"\r\nlfi_input = \"../../../../../etc/passwd\"\r\nrce_input = \"system('ls');\"\r\nopen_redirect_input = \"window.location='http://evil.com';\"\r\n\r\n# Validate inputs\r\nprint(\"SQL Injection Safe:\", validator.validate_sql_input(sql_input))\r\nprint(\"XSS Safe:\", validator.validate_html_input(xss_input))\r\nprint(\"Command Injection Safe:\", validator.validate_command_input(command_input))\r\nprint(\"Path Traversal Safe:\", validator.validate_path_traversal(path_input))\r\nprint(\"CSRF Safe:\", validator.validate_csrf_input(csrf_input))\r\nprint(\"RFI Safe:\", validator.validate_rfi_input(rfi_input))\r\nprint(\"LFI Safe:\", validator.validate_lfi_input(lfi_input))\r\nprint(\"RCE Safe:\", validator.validate_rce_input(rce_input))\r\nprint(\"Open Redirect Safe:\", validator.validate_open_redirect_input(open_redirect_input))\r\n\r\n```\r\n\r\n\r\n### License\r\n\r\n\r\nThis project is licensed under the MIT License. See the LICENSE file for more details.\r\n\r\n### Contact\r\n\r\nIf you have any questions or feedback, please feel free to reach out.\r\n\r\n### Contributing\r\n\r\nContributions to QDraco are welcome! Whether it's a bug report, new feature, correction, or any other type of contribution, please feel free to open an issue or submit a pull request on the GitHub repository.\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A library for validating user inputs to prevent common security vulnerabilities.",
    "version": "0.1",
    "project_urls": {
        "Homepage": "https://github.com/qaisdraco/qaisdraco"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "170de1fe1698301abf23474582dabba047591a11e7df802f53c2136adc7d58f2",
                "md5": "68360ba5b837098ea0a12f01071f5574",
                "sha256": "5f34b4c96577344e29608bf937cb317d3465e0fdc415a3ed8eae85f36a0bb9cd"
            },
            "downloads": -1,
            "filename": "QDraco-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "68360ba5b837098ea0a12f01071f5574",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4911,
            "upload_time": "2024-08-17T06:19:03",
            "upload_time_iso_8601": "2024-08-17T06:19:03.540839Z",
            "url": "https://files.pythonhosted.org/packages/17/0d/e1fe1698301abf23474582dabba047591a11e7df802f53c2136adc7d58f2/QDraco-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5081d6d8946b5a12138a8451b2c89e7ce73db3c2e94e5179d8ae32cf85e6d5ea",
                "md5": "ac77d2ce30f93e85fffc1d72b0800150",
                "sha256": "1f55df36ca67406f98827888796c2effb5cae288b8fa38b386c59db8e3d6fc49"
            },
            "downloads": -1,
            "filename": "QDraco-0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ac77d2ce30f93e85fffc1d72b0800150",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5097,
            "upload_time": "2024-08-17T06:19:06",
            "upload_time_iso_8601": "2024-08-17T06:19:06.321950Z",
            "url": "https://files.pythonhosted.org/packages/50/81/d6d8946b5a12138a8451b2c89e7ce73db3c2e94e5179d8ae32cf85e6d5ea/QDraco-0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-17 06:19:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "qaisdraco",
    "github_project": "qaisdraco",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "qdraco"
}
        
Elapsed time: 0.29359s