-
Notifications
You must be signed in to change notification settings - Fork 2
/
git_over.py
41 lines (33 loc) · 1.19 KB
/
git_over.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
37
38
39
40
41
#!/usr/bin/env Python3
import requests
import optparse
from colorama import Fore
def get_arguments():
parser = optparse.OptionParser()
parser.add_option('-l', '--list', dest='list', help="List of URLs")
parser.add_option('-v', '--verbose', help="Enables verbosity", action="store_true")
(option, arguments) = parser.parse_args()
if not option.list:
print("[-] Please specify a list of URLs.")
return option
options = get_arguments()
urllist = [line.rstrip('\n') for line in open(options.list)]
if options.verbose:
def verbose():
for url in urllist:
response = requests.get('http://' + url)
if response.status_code == 404:
print("http://" + url + "\t" + Fore.RED + "Vulnerable")
print(Fore.RESET)
else:
print("http://" + url + "\t" + Fore.BLUE + "Not Vulnerable")
print(Fore.RESET)
verbose()
else:
def notverbose():
for url in urllist:
response = requests.get('http://' + url)
if response.status_code == 404:
print("http://" + url + "\t" + Fore.RED + "Vulnerable")
print(Fore.RESET)
notverbose()