Skip to content

Commit 8a24052

Browse files
author
root
committed
frist commit for WebChecker
0 parents  commit 8a24052

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

WebChecker.py

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/usr/bin/env python
2+
# -*- encoding: utf-8 -*-
3+
4+
import requests
5+
import argparse
6+
7+
8+
def check(domain, resource):
9+
url = (domain + "/" + resource) if domain[-1] != "/" else (domain + resource)
10+
11+
r = requests.get(url)
12+
13+
if r.status_code == requests.codes.ok:
14+
print("[+] " + resource + " is found")
15+
return True
16+
elif r.status_code != 404:
17+
print("[?] " + resource + " may exist (" + str(r.status_code)+ ")")
18+
else:
19+
print("[-] " + resource + " not found")
20+
21+
return False
22+
23+
if __name__ == "__main__":
24+
25+
parser = argparse.ArgumentParser(description='The Checker for Web')
26+
parser.add_argument('--domain', type=str,
27+
default='http://127.0.0.1/', dest='domain',
28+
help='the domain you insterested in')
29+
30+
domain = parser.parse_args().domain
31+
32+
33+
# robots.txt
34+
if check(domain, "robots.txt"):
35+
url = (domain + "/robots.txt") if domain[-1] != "/" else (domain + "robots.txt")
36+
r = requests.get(url)
37+
print(r.text)
38+
# static/ js/ css/ img/
39+
check(domain, "static/")
40+
check(domain, "js/")
41+
check(domain, "css/")
42+
check(domain, "img/")
43+
44+
# upload/ uploads/
45+
check(domain, "upload/")
46+
check(domain, "uploads/")
47+
# file/ files/
48+
check(domain, "file/")
49+
check(domain, "files/")
50+
# tmp/ temp/
51+
check(domain, "tmp/")
52+
check(domain, "temp/")
53+
54+
# phpinfo.php
55+
check(domain, "phpinfo.php")
56+
# WEB-INF/
57+
check(domain, "WEB-INF/")
58+
59+
# .DS_Store
60+
check(domain, ".DS_Store")
61+
# .git/
62+
# check(domain, ".git")
63+
check(domain, ".git/HEAD")
64+
# .hg/
65+
check(domain, ".hg/")
66+
# .svn/
67+
check(domain, ".svn/")
68+
# ../
69+
check(domain, "../")
70+
71+
# login/ login.php
72+
check(domain, "login/")
73+
check(domain, "login.php")
74+
75+
# admin/ admin.php
76+
check(domain, "admin/")
77+
check(domain, "admin.php")
78+
# admin-console/
79+
check(domain, "admin-console/")
80+
# web-console/
81+
check(domain, "web-console/")
82+
# phpMyAdmin/ phpmyadmin/ pma/
83+
check(domain, "phpMyAdmin/")
84+
check(domain, "phpmyadmin/")
85+
check(domain, "pma")
86+

0 commit comments

Comments
 (0)