当前位置:网站首页>ENScanGo main domain name batch extraction script
ENScanGo main domain name batch extraction script
2022-08-07 13:15:00 【Mountains and rivers'】
For ENScanGo, please refer to: Red team web management information collection_Shanshanerchuan' blog-CSDN Blog
This is a tool written by Master Keac of the Wolf Group Security Team to solve the problem of difficult enterprise information collection. It can collect the ICP filing, APP, applet, WeChat public of the target and its holding company with one clickNumber and other information are then aggregated and exported.
This tool cannot query the company's main site in batches, so here is a script to implement it.The company name is written in company.txt, and the main domain name can be extracted in batches after the script is run
enscan batch get main domain.py
import os, fnmatch, win32apifrom openpyxl import Workbook, load_workbookfrom colorama import init,Foreinit(autoreset=True)path = "D:\\xxxx\\Red Team" #ENScanGo is placed in this pathenscan_path = path + "\\ENScanGo"enscan_outs_path = enscan_path + "\\outs"domain_set = set() #Install the main domain of all companiesnodomain_company = set()def enscan(company):enscan_command = "ENScanPublic_amd64_windows.exe -n %s -type all"%(company)print(Fore.RED + "\n[info]Start collecting '%s' main domain..."%(company))#Determine whether the company folder exists the original resultos.chdir(enscan_outs_path)for name in os.listdir():if fnmatch.fnmatch(name,"*%s*--*"%(company)):os.remove(name)#Excuting an orderos.chdir(enscan_path)os.system(enscan_command)# extract the main domainprint(Fore.RED + "\nExtract the main domain as follows: ")os.chdir(enscan_outs_path)domain = set() #Install the main domain of each companyfor name in os.listdir():if fnmatch.fnmatch(name,"*%s*--*"%(company)):wb = load_workbook(name)try:sheet = wb["ICP filing"]except:sheet = wb["icp"]for row in sheet.iter_rows(): # Traverse all tables and display them in the form of tuplesfor cell in row: # Traverse all the tables and display them one by oneif "C" in cell.coordinate : #The position of each table cell.coordinate such as A1 A2if cell.coordinate != 'C1': #Do not extract the first rowprint(cell.value)domain.add(cell.value)domain_set.add(cell.value)if len(domain) == 0:print("The company did not find the main domain!")nodomain_company.add(company)if __name__ == '__main__':for c in open("company.txt",'r',encoding="utf-8"):enscan(c.replace("\n",""))# output main domainos.chdir(path)if os.path.exists("ens_domain.txt"):os.remove("ens_domain.txt")print(Fore.RED + "\nAll main fields are as follows:")for i in domain_set:print(i)with open("ens_domain.txt","a",encoding="utf-8") as f:f.write(i + "\n")if len(nodomain_company) != 0:print(Fore.RED + "\nThe companies that have not obtained the main domain are as follows:")for h in nodomain_company:print(h)win32api.ShellExecute(0, 'open', 'ens_domain.txt', '', '', 1) 

边栏推荐
- [Learning] What are the packages introduced in the code?
- 网页设计(二)
- China University of Petroleum (Beijing) - "Workover Engineering" Phase II Online Work
- SkyWalking+.NET5初体验
- Postgresql logical backup tools pg_dump and pg_resotre learning
- VMware's record of virtual machine expansion
- Character (string) and memory manipulation library functions
- [Learning] TensorFlow2 environment configuration
- Qt implementation based on matchtemplate long shots
- 由GEE生成逐月MODIS的NDVI影像
猜你喜欢

Leetcode LCP 40. 心算挑战(可以,已解决)

2022年危险化学品生产单位安全生产管理人员考试题模拟考试题库及答案

Prometheus 自定义metrics

网安学习-应急响应1

2022年流动式起重机司机试题模拟考试平台操作

rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp)

爱可可AI前沿推介(8.7)

Navicat gets stuck for a few seconds after connecting to mysql for a period of time

odoo community edition approval flow

ReentrantReadWriteLock读写锁
随机推荐
Meta提出OmniMAE,用统一架构预训练视频和文本,ImageNet上达86.5%,SSv2上达75.3%!...
若依使用EasyExcel导入和导出数据
微信小程序和微信H5有什么区别?
如何判断一个点在多边形内
Machine Learning in Practice (1) - Overview
扬州大学回应「清华博士入职5年,月薪才372元」
5.cuBLAS开发指南中文版--cuBLAS中的Create()和Destroy()
Spire.Office for NET 全家桶最新版7.7.6
网上办理国信证券券开户安不安全?
DiskGenius安装教程
Question about #mysql#: Create the above table as shown, the error code is as follows SELECT * FROM studentwhere name LIKE can be%
5. Chinese version of cuBLAS Development Guide--Create() and Destroy() in cuBLAS
Character (string) and memory manipulation library functions
ReentrantReadWriteLock Read-write lock
PDF conversion tool installation tutorial
Meta提出OmniMAE:用统一架构预训练视频和文本
我说MySQL联合索引遵循最左前缀匹配原则,面试官让我回去等通知
对话360数字安全集团高级副总裁高瀚昭:政企提升数字安全“看见”能力需全盘考虑不可“以点带面”
Redis docker 主从模式与哨兵sentinel
红队web打点信息收集