利用撒旦搜索引擎查询ip个数,批量下载ip
2023-02-18 16:29:32 时间
利用撒旦搜索引擎查询ip个数,批量下载ip,使用语言python3.x
批量测试时,为了方便直接撸下ip,所以用python写了个GUI撒旦利用工具,写的不是很好,但能用,最下面有下载。
from tkinter import * import threading import shodan root=Tk() screenwidth = root.winfo_screenwidth() screenheight = root.winfo_screenheight() size = '%dx%d+%d+%d' % (300, 400, (screenwidth-300)/ 2, (screenheight-400) / 2) root.geometry(size) root.title('撒旦GUI') root.resizable(width=False, height=False) title=Label(root,text='python3 撒旦利用GUI',font="16") title.pack() api=Label(root,text='输入API',width=12) api_input=Entry(root,width=20) api.place(x=30,y=40) api_input.place(x=140,y=40) search=Label(root,text='请输入查询语句',width=12) search_input=Entry(root,width=20) search.place(x=30,y=80) search_input.place(x=140,y=80) #文件名输入 txt_name_input=Entry(root) txt_name_input.place(x=180,y=120,width=60,height = 30) txt_txt = Label(root,text='.txt',font="10") txt_txt.place(x=240,y=125) #输出框 show_1 = Entry(root) show_1.place(x=20, y=160, width=250, height=200) def false(): show_1.insert("1","请检查API、网络状态、关键字") def ip_number(): show_1.delete(0, END) show_1.insert("1", "正在查询") try: api_s = shodan.Shodan(api_input.get()) results = api_s.search(search_input.get()) #如果修改搜索的内容请注意符号 ips = results['total'] #ip个数 ips_str = "ip个数为 "+str(ips) show_1.delete(0, END) show_1.insert(1,ips_str) except shodan.APIError as e: false() def ip_download(): show_1.delete(0,END) show_1.insert("1", "正在下载") txt_name =txt_name_input.get()+".txt" f = open(txt_name, 'a+') try: api_s = shodan.Shodan(api_input.get()) results = api_s.search(search_input.get()) show_1.insert(1, "正在下载ip:端口. . . . . . ") for result in results['matches']: url = result['ip_str'] + ":" + str(result['port']) f.write(url) #f.write("http://" + url) f.write("\n") f.close() show_1.delete(0, END) show_1.insert(1,"ip收集完毕 T0.0T") except shodan.APIError as e: false() def T_ip_number(): T = threading.Thread(target=ip_number) T.start() def T_ip_download(): T = threading.Thread(target=ip_download) T.start() B_ip=Button(root,text="获取ip个数",width=10,relief=GROOVE,command=T_ip_number) B_ip.place(x=20,y=120) B_txt=Button(root,text="下载到txt",width=10,relief=GROOVE,command=T_ip_download) B_txt.place(x=100,y=120) root.mainloop()
py下载 https://wwn.lanzout.com/iRkPs02f2jkj
exe下载 https://wwn.lanzout.com/iaktF02f2i9c 密码 6vdu
相关文章
- 轻量级网络-MobileNetv1 论文解读
- 轻量级网络-RepVGG 论文解读
- 轻量级网络-ShuffleNetv2 论文解读
- 深度学习算法基础
- 模型压缩部署概述
- 卷积神经网络压缩方法总结
- Kubernetes(K8S)特性有哪些?
- Kubernetes(K8S)是什么?
- Docker安装MySQL并使用Navicat连接
- Docker安装Redis并使用Another Redis Desktop Manager连接
- C#/.NET/.NET Core优秀项目框架推荐
- Docker日常工作常用命令
- Ubuntu添加非root用户到Docker用户组
- Ubuntu 20.04安装Docker
- C#复杂XML反序列化为实体对象两种方式
- C#XmlHelper帮助类操作Xml文档的通用方法汇总
- C# XML基础入门(XML文件内容增删改查清)
- .NET中XML序列化和反序列化常用类和用来控制XML序列化的属性总结(XmlSerializer,XmlTypeAttribute,XmlElementAttribute,XmlAttributeAttribute,XmlArrayAttribute...)
- 2022年了有哪些值得推荐的.NET ORM框架?
- Typora+Docsify快速入门