PHP Classes

XSS Police: Block accesses attempting to perform XSS attacks

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 26%Total: 1,106 All time: 3,398 This week: 40Up
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: United States United States
Age: 34
All time rank: 1271184 in United States United States
Week rank: 197 Up20 in United States United States Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files (5)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,106
This week:0
All time:3,398
This week:40Up
User Ratings User Comments (1)
 All time
Utility:33%StarStar
Consistency:50%StarStarStar
Documentation:-
Examples:50%StarStarStar
Tests:-
Videos:-
Overall:26%StarStar
Rank:4400