-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
30 lines (24 loc) · 936 Bytes
/
app.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
from general import *
from domain_name import *
from ip_address import *
from robot_txt import *
from run_nmap import *
from whois import *
ROOT_DIR = 'companies'
create_dir(ROOT_DIR)
def gather_info(name, url):
domain_name = get_domain_name(url)
robots_txt = get_robot_txt(url)
ip_address = get_ip_address(domain_name)
whois = get_whois(domain_name)
nmap = run_nmap('-F', ip_address)
create_report(name, url, domain_name, nmap, robots_txt, whois)
def create_report(name, url, domain_name, nmap, robots_txt, whois):
project_dir = ROOT_DIR + '/' + name
create_dir(project_dir)
write_file(project_dir + "/full_url.txt", 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 + "/whois.txt", whois)
print(gather_info('google', 'https://www.google.com'))