A library used to stop your website from being attacked.


Keywords
attack, django, flask, shield, web, xss, python, python-3, python-package, python3, security, xss-attacks, xss-scanner
License
MIT
Install
pip install xss-shield==0.1.0

Documentation

xss-shield

A Python library to prevent your website from being attacked.

PyPI GitHub Docs

PyPI - Downloads PyPI - Python Version PyPI - Wheel GitHub top language Documentation Status

Installing

Type command:

$ pip install xss-shield

Usage

Function excape(s: str, strict=True)

Arguments

  • s: the string to parse

  • strict:

if strict = False -> only replace <script> tag

example:

import xss_shield

unsafe_str = '<script>alert("Bad.");</script>'
safe_str = xss_shield.escape(unsafe_str)

The full example is in the examples/ directory.

Docs

The docs are availible here