Skip to main content

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)

Source distribution for safescript 1.0.2
File Size Uploaded
safescript-1.0.2.tar.gz 2.9 kB Details

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

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

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