简单版fofa工具

最近在学习fofa,感觉功能挺强大的,就开了一个会员,来玩玩,不过结果是挺多的,在网上也有很多工具爬取下,不过我找到一个简化版的fofa,分享一下

搜索HTTP响应头中含有"thinkphp"关键词的网站和IP

结果有170361条,肯定看不完的,用脚本爬取,

1 import pyfofa
2 
3 email = ''  #邮箱
4 key = ''    
5 search = pyfofa.FofaAPI(email,key)
6 for host,ip in search.get_data('title="header="thinkphp"',1,"host,ip")['results']:
7     print(host,ip)

看了一下,我只想爬取中国的,那我组合一下语法

1 #lanxing
2 #子域名查询
3 import pyfofa
4 
5 email = ''  #邮箱
6 key = ''   
7 search = pyfofa.FofaAPI(email,key)
8 for host,ip in search.get_data('header="thinkphp" && country="CN"',1,"host,ip")['results']:
9     print(host,ip)

如果我想查询C段,也可以,不用爆破,防止测试网站挂了

哈哈哈

#lanxing
#子域名查询
import pyfofa

email = ''  #邮箱
key = ''    
search = pyfofa.FofaAPI(email,key)
for host,ip in search.get_data('domain="baidu.com"',1,"host,ip")['results']:
    print(host,ip)

原文地址:https://www.cnblogs.com/lanyincao/p/14685382.html