-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.py
53 lines (48 loc) · 1.48 KB
/
main.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
from general import *
from domain_name import *
from whois import *
from robots_txt import *
from nmap import *
from ip_addr import *
from traceroute import *
from extractPII import *
from webcrawler import *
from nslookup import *
from cms import *
from nikto import *
import os
from art import *
root_dir='Scanned_Websites'
os.system('clear')
os.system('mkdir '+root_dir)
def gather_info(name,url):
domain_name=get_domain_name(url)
ip_addr=get_ip_address(domain_name)
nmap=get_nmap('-F',ip_addr)
robots_txt=get_robots_txt(url)
get_cms(url)
whois=get_whois(domain_name)
print('------------------------')
print('Whois Scan of the given URL-')
print('\n')
print(whois)
tracert(domain_name)
getLinks(url)
getInfo(url)
getDNSInfo(domain_name)
get_nikto('-h',ip_addr)
print('------------------------')
def create_report(name,full_url,domain_name,nmap,robots_txt,ip_addr):
project_dir = root_dir + '/' + name
os.system('mkdir '+project_dir)
write_file(project_dir + '/full_url.txt' , full_url)
write_file(project_dir + '/domain_name.txt' , domain_name)
write_file(project_dir + '/nmap.txt' , nmap)
write_file(project_dir + '/robots.txt' , robots_txt)
write_file(project_dir + '/ip_addr.txt' , ip_addr)
tprint('Web Scanner')
a=str(input('Enter project name:'))
print("Enter site in the following format: http://www.<website>")
print("May not work for https websites")
x=str(input('Enter site to scan:'))
gather_info(a,x)