我制作了一个脚本:
import os , time
from pathlib import Path
from pushover import Client
client = Client("MY CLIENT KEY", api_token="MY API KEY")
###Run aquatone
###Create a directory named site if not exists
###copy urls.txt in site directory
###Check for urls in urls.txt
domains = open('/root/programming/aquarecon/domains.txt', 'r')
hue = domains.readlines()
for site in hue:
#run_aquatone = os.system('aquatone-discover -d ' + site.strip('\n') + ' -t 30')
#run_aquatone_scan = os.system('aquatone-scan -d ' + site.strip('\n') + ' -t 30 -p huge')
current_directory = os.getcwd()
url_txt_path = '/root/aquatone/' + site.strip('\n') + '/urls.txt'
#print(url_txt_path)
site_directory = Path("/root/programming/aquarecon/"+ site.strip('\n'))
time.sleep(1)
if site_directory.is_dir() == False:
print('Site Have Not Been Monitored Yet')
os.system('mkdir '+ '' + '/root/programming/aquarecon/'+site.strip('\n'))
copy_url_txt = os.system('cp '+ url_txt_path + ' ' + site.strip('\n') )
else:
print('Site Exists time to use flashback')
open_new_urls = open('/root/aquatone/' + site.strip('\n') + '/urls.txt','r')
open_old_urls = open('/root/programming/aquarecon/' +site.strip('\n') +'/urls.txt' , 'r')
readlines_old = open_old_urls.readlines()
readlines_new = open_new_urls.readlines()
client.send_message('New Subdomain Found ', title="CRON")
for i in readlines_new:
if i not in readlines_old:
client.send_message('New Subdomain Found ' + i, title="AquaRecon")
copy_url_txt = os.system('cp '+ url_txt_path + ' ' + site.strip('\n'))
甚至我将cronjob设置为:
10 * * * * /usr/bin/python3.5 /root/programming/aquarecon/aquarecon.py
但是该脚本无法随时运行。 快速信息:
Aquatone是枚举子域的工具:)
任何帮助将不胜感激。
谢谢