src挖掘 | fofa联动xray批量刷src

admin 2022年5月23日03:11:37评论291 views字数 1021阅读3分24秒阅读模式

1、利用fofa API收集目标


需要安装python2

# -*- coding: utf-8 -*-import timeimport urllib2
import fofaimport json
def write_url(urls):with open('xxx.txt','a+') as f: f.write(urls+'n')
if __name__ == "__main__": email, key = ('[email protected]','key') #输入email和key    client = fofa.Client(email, key)                                  #将email和key传入fofa.Client类进行初始化和验证,并得到一个fofa client对象
if client.get_userinfo():print "认证成功!!!" query_str = '"edu.cn" && country="CN"'for page in range(2,10): # 爬取页数try: time.sleep(2)print "正在爬取第{}页".format(page) dict_url = json.loads(client.get_json_data(query_str, page=page))['results']for i in dict_url:if "https://" not in i: # 这里过滤掉了https开头的 write_url(i)print iexcept urllib2.HTTPError:print "HTTP Error 502: Bad Gateway"


2、使用xray批量验证


以管理员身份运行

src挖掘 | fofa联动xray批量刷src

# 单个url检测./xray_windows_amd64 webscan --url https://xxx.edu.cn --html-output edu.html# 批量检测./xray_windows_amd64 webscan --url-file edu.txt --html-output edu.html


以html方式输出

src挖掘 | fofa联动xray批量刷src


src挖掘 | fofa联动xray批量刷src


xray更多使用方式:https://www.anquanke.com/post/id/184204



作者:多学点技术

原文链接:https://blog.csdn.net/weixin_44032232/article/details/113825008

原文始发于微信公众号(菜鸟学信安):src挖掘 | fofa联动xray批量刷src

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年5月23日03:11:37
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   src挖掘 | fofa联动xray批量刷srchttp://cn-sec.com/archives/1033956.html

发表评论

匿名网友 填写信息