Skip to main content

A Python module for enhancing web application security

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safescript-1.0.2.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file safescript-1.0.2.tar.gz.

File metadata

  • Download URL: safescript-1.0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for safescript-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4ca3de6058404394a4be6a4ea69a169f69ba2f1ce10a7bf40897e1739a09e7b7
MD5 2756739e2ad47f9d733fd8d7711271d4
BLAKE2b-256 5f6f68056ea29eabf2a91922cb8eb757765aab1a5304d98dbc18ba5497bb0cc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page