一個快速的XSS消除PHP庫:Stauros
Stauros
一個快速的XSS消除PHP庫.
IMPORTANT
THIS IS AN EXPERIMENTAL LIBRARY, USE AT YOUR OWN RISK
How to use it
With the default settings, simply callStauros->scanHTML():
$stauros = new Stauros; $clean = $stauros->scanHTML($dirty);
Easy as that
Working with streams
Stauros supports streaming content as well. You can use a stream as input, getting a string as output:
$clean = $stauros->scanHTMLStreamToString($stream);
Or you can use it as a stream to stream process:
$stauros->scanHTMLStreamToStream($input, $output);
Advanced Usage
The configuration class (Stauros\HTML\Config) allows you to specify html tag whitelists, as well as attribute whitelist and implement an attribute callback for further customization.
本文由用戶 ygp8 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!