2017 © Pedro Peláez
 

library xss

Coercive Security Router

image

coercive/xss

Coercive Security Router

  • Wednesday, February 7, 2018
  • by Coercive
  • Repository
  • 1 Watchers
  • 3 Stars
  • 561 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 21 % Grown

The README.md

Coercive Security Xss

A simple detection of XSS attack in url. like '<' '>' and quotes..., (*1)

Get

composer require coercive/xss

Load

use Coercive\Security\Xss;

# Test URL
$url = "https://mywebsite.com/?var='%22>";

# Load with construct param
$xss = new XssUrl($url);

# Or use setUrl on an alredy loaded instance
$xss = new XssUrl;
$xss->setUrl($url);

# Detect
if($xss->isXss()) { die; }

New detection optimisation

# Test encoded url with script => alert('XSS')
$url = "&#x6A&#x61&#x76&#x61&#x73&#x63&#x72&#x69&#x70&#x74&#x3A&#x61&#x6C&#x65&#x72&#x74&#x28&#x27&#x58&#x53&#x53&#x0027&#x29";

# Load with construct param
$xss = new XssUrl($url);

# Show example
echo '<a href="'.$url.'">BEFORE<a>';
echo '<br />';
echo '<a href="'.$xss->getFiltered().'">AFTER<a>';

The Versions

07/02 2018

dev-master

9999999-dev http://coercive.fr

Coercive Security Router

  Sources   Download

MIT GNU

The Requires

  • php >=7

 

07/02 2018

0.0.2

0.0.2.0 http://coercive.fr

Coercive Security Router

  Sources   Download

MIT

The Requires

  • php >=7

 

15/10 2017

0.0.1

0.0.1.0 http://coercive.fr

Coercive Security Router

  Sources   Download

GNU

The Requires

  • php >=7