Socket
Socket
Sign inDemoInstall

xss-polyglots

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    xss-polyglots

A set of malicious payloads for XSS testing


Version published
Weekly downloads
2
decreased by-87.5%
Maintainers
1
Install size
5.47 kB
Created
Weekly downloads
 

Readme

Source

XSS Polyglots

A polyglot is a payload that can be used in more than one context and still be treated as valid data. To learn more about polyglots check out this talk.

Installation

$ npm install xss-polyglots --save-dev

Usage

The xss-polyglots package exports a function that returns an array of payloads.

import getPayloads from 'xss-polyglots';

let xssPayloads = getPayloads();

By default, these payloads will call console.error whenever they can be executed. Otherwise you can specify which function will be called as the first argument of the getPayloads function.

import getPayloads from 'xss-polyglots';

let xssPayloads = getPayloads('myGlobalFunction');

License

MIT

FAQs

Last updated on 13 Jul 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc