Skip to content

SafeScript is a Python module designed to bolster web application security by offering functions that combat common vulnerabilities like XSS and SQL Injection attacks. It provides methods for sanitizing HTML content, escaping special characters, and preventing malicious input from compromising your application's integrity.

License

Notifications You must be signed in to change notification settings

Ishanoshada/SafeScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SafeScript v1.0.2

Python Version

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.

Repository Views Views

Contributors

About

SafeScript is a Python module designed to bolster web application security by offering functions that combat common vulnerabilities like XSS and SQL Injection attacks. It provides methods for sanitizing HTML content, escaping special characters, and preventing malicious input from compromising your application's integrity.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages