SafeScript v1.0.2
SafeScript is a Python module designed to enhance the security of web applications by providing various functions to prevent common security vulnerabilities such as XSS and SQL Injection attacks.
Features
- sanitize_html: Sanitize HTML content to prevent XSS attacks.
- escape_html: Escape special characters in HTML content.
- sanitize_sql: Sanitize SQL input to prevent SQL Injection attacks.
- prevent_xss_and_sqli: Prevent both XSS and SQL Injection attacks.
Installation
You can install SafeScript using pip:
pip install safescript
Usage
from safescript import SafeScript
# Example Usage
input_data = "<script>alert('XSS Attack')</script>"
output = SafeScript.prevent_xss_and_sqli(input_data)
print(output)
Functions
-
sanitize_html(input_html)
- Sanitize HTML content to prevent XSS attacks.
-
escape_html(input_html)
- Escape special characters in HTML content.
-
sanitize_sql(input_sql)
- Sanitize SQL input to prevent SQL Injection attacks.
-
prevent_xss_and_sqli(input_data)
- Prevent both XSS and SQL Injection attacks.
Version History
-
v1.0.2 (Current Version)
- [List of changes in v1.0.2]
-
v1.0.1
- Initial release with basic security functions.
Contributors
Metadata
Release files for safescript 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| safescript-1.0.2.tar.gz | 2.9 kB | Without provenance | Details for safescript-1.0.2.tar.gz |
Release files / safescript-1.0.2.tar.gz
| Download URL | safescript-1.0.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ca3de6058404394a4be6a4ea69a169f69ba2f1ce10a7bf40897e1739a09e7b7
|
|
BLAKE2b-256 checksum How to use checksums |
5f6f68056ea29eabf2a91922cb8eb757765aab1a5304d98dbc18ba5497bb0cc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.5
|
Security for safescript 1.0.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.