-
Notifications
You must be signed in to change notification settings - Fork 1
/
domain_checkpunkspider.py
executable file
·46 lines (39 loc) · 1.21 KB
/
domain_checkpunkspider.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
42
43
44
45
46
#!/usr/bin/env python
import requests
import sys
import json
import warnings
from termcolor import colored
import time
class style:
BOLD = '\033[1m'
END = '\033[0m'
warnings.filterwarnings("ignore")
def checkpunkspider(reversed_domain):
print colored(style.BOLD + '\n---> Trying luck with PunkSpider\n' + style.END, 'blue')
time.sleep(0.5)
req= requests.post("http://www.punkspider.org/service/search/detail/" + reversed_domain, verify=False)
try:
return json.loads(req.content)
except:
return {}
def main():
domain = sys.argv[1]
#convert domain to reverse_domain for passing to checkpunkspider()
reversed_domain = ""
for x in reversed(domain.split(".")):
reversed_domain = reversed_domain + "." + x
reversed_domain = reversed_domain[1:]
res = checkpunkspider(reversed_domain)
if res is not None:
if 'data' in res.keys() and len(res['data']) >= 1:
print colored("Few vulnerabilities found at Punkspider", 'green')
for x in res['data']:
print "==> ", x['bugType']
print "Method:", x['verb'].upper()
print "URL:\n" + x['vulnerabilityUrl']
print "Param:", x['parameter']
else:
print colored("[-] No Vulnerabilities found on PunkSpider", 'red')
if __name__ == "__main__":
main()