工具利用,原创脚本分享

前言

手动信息收集很累也很慢,这时候一个好用的工具能节省不少时间。

脚本文件与源代码下载在文末

工具介绍

theHarvester是一款通过搜索引擎、PGP服务器以及SHODAN数据库收集用户的email,子域名,主机,雇员名,开放端口和banner信息的一款工具。

基础使用:

-d 用于定义域名 -b 用来指定搜索方法

theHarvester -d test.com -b baidu

anubis,baidu,pentesttools,projectdiscovery,qwant,rapiddns,

rocketreach,securityTrails,spyse,sublist3r,threatcrowd,threatminer,

trello,twitter,urlscan,virustotal,yahoo,zoomeye,bing,binaryedge,

bingapi,bufferoverun,censys,certspotter,crtsh,dnsdumpster,duckduckgo,

fullhunt,github-code,google,hackertarget,hunter,intelx,linkedin,

linkedin_links,n45ht,omnisint,otx

可以看到可使用的搜索方式还是很多的。

但在我使用过程中发现,光是只查询一个域名都需要我去不断的更换搜索方法去重复跑工具,有些搜索方式耗费时间也挺长的,要是收集的域名数量要是再多一些,就有点痛苦了。

于是我用go去写了个并发脚本去跑这个工具,脚本套脚本套娃了属于是。使用下来速度还是挺快的。

image-20230226122849979

image-20230226121530229

脚本使用

Python 3.10+

官网下载工具源代码文件https://github.com/laramies/theHarvester

安装依赖

    $ ~ > git clone https://github.com/laramies/theHarvester 
    $ ~ > cd theHarvester

    If developing do:
        $ ~ > python3 -m pip install -r requirements/dev.txt
    Else:
        $ ~ > python3 -m pip install -r requirements/base.txt

    $ ~ > python3 theHarvester.py -h  

然后把main脚本文件和两个存放域名与搜索方法的文档,都放在theHarvester目录中,给于main执行权限,就可以直接开始了./main

domain.txt

image-20230226122033941

source.txt

image-20230226122147916

直接拿来跑只能搜索一些公开的api,要想搜索到更多信息可以要配置theHarvester工具的API key

脚本下载

相关文件获取请私信公众号 工具脚本 获取

目前脚本只能运行在linux环境下

原文转载自,助安社区(https://secself.com/)

posted on 2023-03-01 11:43  助安社区  阅读(83)  评论(0编辑  收藏  举报

导航