Skip to content

Commit 86c9c08

Browse files
committed
First commit.
0 parents  commit 86c9c08

12 files changed

+244
-0
lines changed

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/Vulnerability_Scanner.iml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Vulnerability-Scanner
2+
3+
**DEPENDENCIES:**
4+
```
5+
python3
6+
python3-pip
7+
```
8+
9+
-------------------------------------------------------
10+
11+
**INSTALLATION:**
12+
```
13+
git clone https://github.com/ilolm/vulnerability-scanner.git
14+
cd vulnerability-scanner
15+
pip3 install -r requirements.txt
16+
chmod +x vulnerability_scanner.py
17+
```
18+
19+
-------------------------------------------------------
20+
21+
**USAGE:**
22+
```
23+
Usage: ./vulnerability_scanner.py [options]
24+
25+
Options:
26+
-h, --help show this help message and exit
27+
-u TARGET_URL, --url=TARGET_URL
28+
Specify a target url.
29+
```

__pycache__/scanner.cpython-311.pyc

6.09 KB
Binary file not shown.

__pycache__/scanner.cpython-312.pyc

5.7 KB
Binary file not shown.

extract_forms.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env python3
2+
3+
import requests
4+
import urllib.parse as urlparse
5+
from bs4 import BeautifulSoup
6+
7+
8+
def request(url):
9+
try:
10+
return requests.get(url)
11+
except requests.exceptions.ConnectionError:
12+
pass
13+
14+
target_url = "http://10.0.2.5/mutillidae/index.php?page=dns-lookup.php"
15+
response = request(target_url)
16+
17+
parsed_html = BeautifulSoup(response.content, features="lxml")
18+
forms_list = parsed_html.findAll("form")
19+
20+
for form in forms_list:
21+
action = form.get("action")
22+
23+
post_url = urlparse.urljoin(target_url, action)
24+
method = form.get("method")
25+
26+
inputs_list = form.findAll("input")
27+
post_data = {}
28+
29+
for input in inputs_list:
30+
input_name = input.get("name")
31+
input_type = input.get("type")
32+
input_value = input.get("value")
33+
34+
if input_type == 'text':
35+
input_value = 'test'
36+
37+
post_data[input_name] = input_value
38+
39+
result = requests.post(post_url, data=post_data)
40+
print(result.content)

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
urllib3
2+
bs4
3+
regex
4+
requests

0 commit comments

Comments
 (0)