forked from dvopsway/datasploit
-
Notifications
You must be signed in to change notification settings - Fork 435
/
Copy pathdomain_checkpunkspider.py
executable file
·65 lines (49 loc) · 1.57 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python
import base
import requests
import sys
import json
import warnings
from termcolor import colored
import time
ENABLED = True
class style:
BOLD = '\033[1m'
END = '\033[0m'
warnings.filterwarnings("ignore")
def checkpunkspider(reversed_domain):
""" 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 {} """
return {}
def banner():
print colored(style.BOLD + '\n---> Trying luck with PunkSpider\n' + style.END, 'blue')
def main(domain):
reversed_domain = ""
for x in reversed(domain.split(".")):
reversed_domain = reversed_domain + "." + x
reversed_domain = reversed_domain[1:]
return checkpunkspider(reversed_domain)
def output(data, domain=""):
if data is not None:
if 'data' in data.keys() and len(data['data']) >= 1:
print colored("Few vulnerabilities found at Punkspider", 'green')
for x in data['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\n", 'red')
if __name__ == "__main__":
try:
domain = sys.argv[1]
banner()
result = main(domain)
output(result, domain)
except Exception as e:
print e
print "Please provide a domain name as argument"