forked from TheKingOfDuck/fuzzDicts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xss.py
28 lines (27 loc) · 675 Bytes
/
xss.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: xss
Description :
Author : CoolCat
date: 2019/4/27
-------------------------------------------------
Change Activity:
2019/4/27:
-------------------------------------------------
"""
__author__ = 'CoolCat'
import re
n = 0
for xss in open("easyXssPayload.txt"):
n += 1
try:
alert = re.findall(r"alert\((.+?)\)", xss)
print(alert[0])
xss = xss.replace(alert[0],str(n))
print(xss)
f = open("neweasyXssPayload.txt","a")
f.write(xss)
f.close()
except:
pass