-
Notifications
You must be signed in to change notification settings - Fork 11
/
website-vulnerability-finder.py
36 lines (31 loc) · 1.11 KB
/
website-vulnerability-finder.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
29
30
31
32
33
34
35
36
import requests
from bs4 import BeautifulSoup
print('''\033[93m
*********************************************
* *
* Simple Website Vulnerability Finder *
* Github Page : https://github.com/R3DHULK *
* *
*********************************************
''')
def scan_website(url):
# Send an HTTP GET request to the website
response = requests.get(url)
# Parse the HTML of the website
soup = BeautifulSoup(response.text, 'html.parser')
# Initialize an empty list to store vulnerabilities
vulnerabilities = []
# Search for HTML form elements
forms = soup.find_all('form')
for form in forms:
# Check if the form has a vulnerable method (e.g. GET)
method = form.get('method')
if method.lower() == 'get':
vulnerabilities.append('Vulnerable form: {}'.format(form))
# Return the list of vulnerabilities
return vulnerabilities
# Test the scanner
url = input("\033[92m [*] Enter URL: ")
print("")
vulnerabilities = scan_website(url)
print(vulnerabilities)