利用撒旦搜索引擎查询ip个数,批量下载ip
利用撒旦搜索引擎查询ip个数,批量下载ip,使用语言python3.x
批量测试时,为了方便直接撸下ip,所以用python写了个GUI撒旦利用工具,写的不是很好,但能用,最下面有下载。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | 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
如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页面明显位置给出作者和原文连接,否则保留追究法律责任的权利。
本文作者:mt0u的Blog
本文链接:https://www.cnblogs.com/mt0u/p/16087457.html
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步