Login   Register  
PHP Classes

XSS Police: Block accesses attempting to perform XSS attacks

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2011-08-28 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,071 All time: 3,231 This week: 1,387Up
Version License PHP version Categories  
xss-attack-police 1Artistic License3Databases, Security
Description Author  

This class can block accesses attempting to perform cross-site scripting attacks.

It can look at a given request variable value and detect character sequences that can be used in cross-site scripting attacks.

If an eventual attack is detected, the class can add a record to a MySQL database table to mark the current access IP address to be blocked in future accesses.

Innovation Award  
PHP Programming Innovation award nominee
August 2011
Number 4
Cross-site scripting attacks can be dangerous to a site, as they can be used to steal cookies of users accessing a site and eventually allow a malicious person to access the site as if he was one of the other users.

This class can be used to prevent causing greater damage to a site by detecting eventual attempts to perform cross-site scripting attacks and blocking the accesses of computers that were used to perform such kind of attack attempts.

Manuel Lemos
Picture of omid zarifi
Name: omid zarifi <contact>
Classes: 4 packages by
Country: Iran Iran
Age: 24
All time rank: 123712 in Iran Iran
Week rank: 339 Up10 in Iran Iran Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file attack.sql Data mysql db file
Plain text file class.xss.police.php Class class file
Accessible without login Plain text file config.php Conf. config db
Accessible without login Plain text file index.php Example index page for test
Accessible without login HTML file police.html Data suspend page for attacker

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,071All time:3,231
 This week:0This week:1,387Up
 User Comments (1)