Skip to content

Commit 6b5a1c1

Browse files
Merge pull request #2629 from Kalivarapubindusree/web2
Web_Application_Mapper Script added
2 parents 2fa2742 + ee95feb commit 6b5a1c1

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

Web_Application_Mapper/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Web_Application_Mapper
2+
3+
Short description of package/script
4+
5+
- This Script Was simple to setup
6+
- Need import os, threading, requests
7+
8+
## Setup instructions
9+
10+
Just Need to Import os, threading, requests then run the Web_Application_Mapper.py file and for running python3 is must be installed!
11+
12+
## Detailed explanation of script, if needed
13+
14+
This Script Is Only for Web_Application_Mapper use only!
15+
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import os
2+
import threading
3+
import requests
4+
5+
threads = 10
6+
target = "http://www.test.com"
7+
directory = "/Users/justin/Downloads/joomla-3.1.1"
8+
filters = [".jpg", ".gif", ".png", ".css"]
9+
10+
os.chdir(directory)
11+
web_paths = []
12+
13+
for r, d, f in os.walk("."):
14+
for files in f:
15+
remote_path = os.path.join(r, files)
16+
if remote_path.startswith("."):
17+
remote_path = remote_path[1:]
18+
if os.path.splitext(files)[1] not in filters:
19+
web_paths.append(remote_path)
20+
21+
22+
def test_remote():
23+
while True:
24+
try:
25+
path = web_paths.pop()
26+
except IndexError:
27+
break
28+
29+
url = f"{target}{path}"
30+
try:
31+
response = requests.get(url)
32+
print(f"[{response.status_code}] => {path}")
33+
except requests.HTTPError as error:
34+
print(f"Failed {error}")
35+
pass
36+
37+
38+
threads_list = []
39+
40+
for i in range(threads):
41+
print(f"Spawning thread: {i}")
42+
t = threading.Thread(target=test_remote)
43+
t.start()
44+
threads_list.append(t)
45+
46+
for t in threads_list:
47+
t.join()

0 commit comments

Comments
 (0)