Skip to content

Commit 26cb9c4

Browse files
committed
update xss scanner to fix an error
1 parent c1e3117 commit 26cb9c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ethical-hacking/xss-vulnerability-scanner/xss_scanner.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_form_details(form):
1616
"""
1717
details = {}
1818
# get the form action (target url)
19-
action = form.attrs.get("action").lower()
19+
action = form.attrs.get("action", "").lower()
2020
# get the form method (POST, GET, etc.)
2121
method = form.attrs.get("method", "get").lower()
2222
# get all the input details such as type and name
@@ -57,6 +57,8 @@ def submit_form(form_details, url, value):
5757
# then add them to the data of form submission
5858
data[input_name] = input_value
5959

60+
print(f"[+] Submitting malicious payload to {target_url}")
61+
print(f"[+] Data: {data}")
6062
if form_details["method"] == "post":
6163
return requests.post(target_url, data=data)
6264
else:

0 commit comments

Comments
 (0)