Skip to content

Commit de0d9ef

Browse files
committed
Made-Changes-XSS-Scanner
1 parent 9dcc7e9 commit de0d9ef

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

Python/XSS-Check/XSS-Check.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,14 @@
33
from urllib.parse import urljoin
44
from colorama import Fore, init, Style
55
from progress.bar import ChargingBar
6-
76
init(autoreset=True)
8-
97
# Get all forms of the mentioned URL
108
def getAllForms(url):
119
page = requests.get(url)
1210
parser = BeautifulSoup(page.content, 'html.parser')
1311
return parser.find_all('form')
14-
1512
f = open("payloads.txt", "r").readlines()
16-
1713
successful_payloads = []
18-
1914
def xss():
2015
forms = getAllForms(url)
2116
for form in forms:
@@ -42,17 +37,12 @@ def xss():
4237
content = requests.post(finalURL, data=randomData)
4338
else:
4439
content = requests.get(finalURL, params=randomData)
45-
4640
# Return True if Payload was successfully Injected
4741
if payload in content.text:
4842
successful_payloads.append(payload)
49-
5043
bar.finish()
51-
52-
5344
url = input(Fore.BLUE + "\nEnter the URL: ")
5445
vulnerable = xss()
55-
5646
if len(successful_payloads):
5747
print(Fore.GREEN + "\nSite is vulnerable to XSS Attack!\n")
5848
for i in successful_payloads:

0 commit comments

Comments
 (0)