Skip to content
KitploitKITPLOIT
उपकरणएक्सप्लॉइटब्लॉग
Log in
जमा करें
उपकरणएक्सप्लॉइटब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

फ़ीडसंपर्कगोपनीयता© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
js-xss — व्हाइटलिस्ट द्वारा निर्दिष्ट कॉन्फ़िगरेशन के साथ अविश्वसनीय HTML को सैनिटाइज़ करें (XSS को रोकने के लिए) | Kitploit
उपकरण/GitHubGitHub/leizongmin/js-xss
रक्षात्मक उपकरणवेब एप्लिकेशन शोषणवेब सुरक्षाउपयोगिताएँ और फ्रेमवर्क
GitHubleizongmin/js-xss

js-xss

व्हाइटलिस्ट द्वारा निर्दिष्ट कॉन्फ़िगरेशन के साथ अविश्वसनीय HTML को सैनिटाइज़ करें (XSS को रोकने के लिए)

रिपॉजिटरी देखें
5.3k63024 अक्टू॰ 2026Kitploit द्वारा समीक्षित
साझा करें
वेबसाइट

NPM version Node.js CI Test coverage David deps node version npm download npm license

व्हाइटलिस्ट द्वारा निर्दिष्ट कॉन्फ़िगरेशन के साथ अविश्वसनीय HTML को सैनिटाइज़ करें (XSS को रोकने के लिए)।

Greenkeeper badge

xss


xss एक मॉड्यूल है जिसका उपयोग XSS हमलों को रोकने के लिए उपयोगकर्ताओं से इनपुट को फ़िल्टर करने के लिए किया जाता है। (XSS हमला क्या है?)

प्रोजेक्ट होमपेज: http://jsxss.com

ऑनलाइन आज़माएँ: http://jsxss.com/en/try.html

中文版文档


विशेषताएँ

  • व्हाइटलिस्ट के साथ अनुमत HTML टैग और उनके एट्रिब्यूट निर्दिष्ट करता है
  • कस्टम फ़ंक्शन का उपयोग करके किसी भी टैग या एट्रिब्यूट को संभालता है।

संदर्भ

  • XSS Filter Evasion Cheat Sheet
  • Data URI scheme
  • XSS with Data URI Scheme

बेंचमार्क (केवल संदर्भ के लिए)

  • xss मॉड्यूल: 22.53 MB/s
  • मॉड्यूल [email protected] से xss() फ़ंक्शन: 6.9 MB/s

परीक्षण कोड के लिए कृपया benchmark निर्देशिका देखें।

वे xss मॉड्यूल का उपयोग कर रहे हैं

  • nodeclub - MongoDB का उपयोग करने वाला एक Node.js bbs - https://github.com/cnodejs/nodeclub
  • cnpmjs.org - एंटरप्राइज़ के लिए निजी npm रजिस्ट्री और वेब - https://github.com/cnpm/cnpmjs.org
  • cocalc.com - सहयोगात्मक गणना और डेटा विज्ञान - https://cocalc.com

इंस्टॉल करें

NPM

npm install xss

Bower

bower install xss

या

bower install https://github.com/leizongmin/js-xss.git

उपयोग

Node.js पर

var xss = require("xss");
var html = xss('<script>alert("xss");</script>');
console.log(html);

सैनिटाइज़ किया गया HTML और हटाए गए तत्व प्राप्त करें

आप सैनिटाइज़ किया गया HTML और हटाए गए टैग/विशेषताओं की सूची दोनों प्राप्त करने के लिए filterXSSWithResult का उपयोग कर सकते हैं:

var xss = require("xss");
var result = xss.filterXSSWithResult('<script>alert("xss");</script><a href="#" onclick="evil()">click</a>');
console.log(result.html);
// Output: "&lt;script&gt;alert(\"xss\");&lt;/script&gt;<a href=\"#\">click</a>"
console.log(result.removed);
// Output: [
//   { type: "tag", tag: "script", html: "<script>", isClosing: false },
//   { type: "tag", tag: "script", html: "</script>", isClosing: true },
//   { type: "attr", tag: "a", attr: "onclick", value: "evil()" }
// ]

ब्राउज़र पर

शिम मोड (संदर्भ फ़ाइल test/test.html):

<script src="https://rawgit.com/leizongmin/js-xss/master/dist/xss.js"></script>
<script>
  // apply function filterXSS in the same way
  var html = filterXSS('<script>alert("xss");</scr' + "ipt>");
  alert(html);
</script>

AMD मोड - शिम:

<script>
  require.config({
    baseUrl: "./",
    paths: {
      xss: "https://rawgit.com/leizongmin/js-xss/master/dist/xss.js",
    },
    shim: {
      xss: { exports: "filterXSS" },
    },
  });
  require(["xss"], function (xss) {
    var html = xss('<script>alert("xss");</scr' + "ipt>");
    alert(html);
  });
</script>

नोट: कृपया उत्पादन परिवेश में URL https://rawgit.com/leizongmin/js-xss/master/dist/xss.js का उपयोग न करें।

कमांड लाइन टूल

फ़ाइल प्रोसेस करें

आप फ़ाइल को प्रोसेस करने के लिए xss कमांड लाइन टूल का उपयोग कर सकते हैं। उपयोग:

xss -i <input_file> -o <output_file>

उदाहरण:

xss -i origin.html -o target.html

सक्रिय परीक्षण

निम्नलिखित कमांड चलाएँ, फिर आप कमांड-लाइन में HTML कोड टाइप कर सकते हैं, और फ़िल्टर किए गए आउटपुट की जाँच कर सकते हैं:

xss -t

अधिक जानकारी के लिए, कृपया इसे देखने के लिए $ xss -h चलाएँ।

कस्टम फ़िल्टर नियम

xss() फ़ंक्शन का उपयोग करते समय, दूसरे पैरामीटर का उपयोग कस्टम नियम निर्दिष्ट करने के लिए किया जा सकता है:

options = {}; // Custom rules
html = xss('<script>alert("xss");</script>', options);

हर बार options पास करने से बचने के लिए, आप एक FilterXSS इंस्टेंस बनाकर इसे तेज़ तरीके से भी कर सकते हैं:

options = {}; // Custom rules
myxss = new xss.FilterXSS(options);
// then apply myxss.process()
html = myxss.process('<script>alert("xss");</script>');

options में पैरामीटर का विवरण नीचे वर्णित किया जाएगा।

श्वेतसूची

whiteList निर्दिष्ट करके, उदा. { 'tagName': [ 'attr-1', 'attr-2' ] }। श्वेतसूची में न होने वाले टैग और विशेषताएँ फ़िल्टर कर दी जाएँगी। उदाहरण के लिए:

// only tag a and its attributes href, title, target are allowed
var options = {
  whiteList: {
    a: ["href", "title", "target"],
  },
};
// With the configuration specified above, the following HTML:
// <a href="#" onclick="hello()"><i>Hello</i></a>
// would become:
// <a href="#">&lt;i&gt;Hello&lt;/i&gt;</a>

डिफ़ॉल्ट whitelist के लिए, कृपया xss.whiteList देखें।

allowList भी समर्थित है, और इसका कार्य whiteList के समान है।

मिलान किए गए टैग के लिए handler फ़ंक्शन को अनुकूलित करें

onTag के साथ handler फ़ंक्शन निर्दिष्ट करके:

function onTag(tag, html, options) {
  // tag is the name of current tag, e.g. 'a' for tag <a>
  // html is the HTML of this tag, e.g. '<a>' for tag <a>
  // options is some addition informations:
  //   isWhite    boolean, whether the tag is in whitelist
  //   isClosing  boolean, whether the tag is a closing tag, e.g. true for </a>
  //   position        integer, the position of the tag in output result
  //   sourcePosition  integer, the position of the tag in input HTML source
  // If a string is returned, the current tag would be replaced with the string
  // If return nothing, the default measure would be taken:
  //   If in whitelist: filter attributes using onTagAttr, as described below
  //   If not in whitelist: handle by onIgnoreTag, as described below
}

मेल खाए गए टैग की विशेषताओं के लिए हैंडलर फ़ंक्शन को अनुकूलित करें

onTagAttr के साथ हैंडलर फ़ंक्शन निर्दिष्ट करके:

function onTagAttr(tag, name, value, isWhiteAttr) {
  // tag is the name of current tag, e.g. 'a' for tag <a>
  // name is the name of current attribute, e.g. 'href' for href="#"
  // isWhiteAttr whether the attribute is in whitelist
  // If a string is returned, the attribute would be replaced with the string
  // If return nothing, the default measure would be taken:
  //   If in whitelist: filter the value using safeAttrValue as described below
  //   If not in whitelist: handle by onIgnoreTagAttr, as described below
}

व्हाइटलिस्ट में न होने वाले टैग के लिए हैंडलर फ़ंक्शन को अनुकूलित करें

onIgnoreTag के साथ हैंडलर फ़ंक्शन निर्दिष्ट करके:

टूल डाउनलोड करें

संबंधित टूल

  • wazuh

    ओपन-सोर्स XDR और SIEM प्लेटफ़ॉर्म जो एंडपॉइंट और क्लाउड वर्कलोड पर खतरे का पता लगाने, लॉग विश्लेषण, फ़ाइल अखंडता निगरानी, कमजोरियों का आकलन और अनुपालन प्रबंधन के लिए है।

  • suricata

    रीयल-टाइम ट्रैफ़िक निरीक्षण, घुसपैठ का पता लगाने और रोकथाम, प्रोटोकॉल विश्लेषण, और नियम-आधारित खतरे की खोज के लिए ओपन-सोर्स नेटवर्क IDS/IPS/NSM इंजन।

  • zeek

    Zeek एक शक्तिशाली नेटवर्क विश्लेषण ढांचा है जो आपके परिचित सामान्य IDS से काफी अलग है।

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

  • 1

    Callisto

    jetp1ane/callisto

    स्वचालित बाइनरी भेद्यता विश्लेषण उपकरण जो Ghidra के माध्यम से निष्पादन योग्य फ़ाइलों को डीकंपाइल करता है, Semgrep के साथ स्यूडो-सी कोड को स्कैन करता है, और गलत सकारात्मकता को कम करने के लिए GPT-3.5-Turbo का उपयोग करके निष्कर्षों को मान्य करता है।

    2.2k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    # घोस्टलॉक वन-टैप निष्पादन ऐप (CVE-2026-43499)

    841
  • 3

    DFRoot

    a2333c/dfroot

    Samsung Galaxy S25 Ultra (SM-S938B) के लिए Android रूट टूल जो बूट पर KernelSU के माध्यम से स्वचालित रूप से रूट प्राप्त करने के लिए DirtyFrag CVE-2026-43284 और CVE-2026-43499 को चेन करता है।

    446
  • 4

    ARTEX

    baarai/artex

    प्लानर/वर्कर एजेंट, एसेट और एक्सप्लोरेशन ग्राफ़, MITM ट्रैफ़िक रिकॉर्डिंग, और भेद्यता पुनःपरीक्षण के साथ LLM मल्टी-एजेंट स्वायत्त पेनेट्रेशन टेस्टिंग प्लेटफ़ॉर्म।

    386
  • 5

    OsintHunter

    letox4/osinthunter

    🎯 अंतिम OSINT टूलकिट: जाँच ग्राफ़, विश्वास स्कोरिंग, उपनाम परिवार, मानचित्र, टाइमलाइन और रिपोर्ट। 49 मॉड्यूल, 400+ साइटें, किसी API कुंजी की आवश्यकता नहीं।

    350
  • 6

    faraday

    infobyte/faraday

    ऑफेंसिव सिक्योरिटी, वल्नरेबिलिटी मैनेजमेंट और ऑटोनॉमस पेंटेस्टिंग के लिए ओपन-सोर्स और AI-संचालित साइबरसिक्योरिटी टूल्स। लैटिन अमेरिका में हैकर्स द्वारा बनाए गए, दुनिया भर में उपयोग किए जाते हैं।

    333

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →