码迷,mamicode.com
首页 > 编程语言 > 详细

python写端口批量扫描器

时间:2017-08-16 17:15:17      阅读:119      评论:0      收藏:0      [点我收藏+]

标签:.com   logs   for   .sh   开始   span   div   ges   error:   

 用到shodan模块

话不多说,马上开始

pip3 install shodan

 

 

import shodan

SHODAN_API_KEY=" 你的shodankey"

api = shodan.Shodan(SHODAN_API_KEY)

 

try:

 results=api.search("3389")

print (‘Results found: %s‘ % results[‘total‘])
for result in results[‘matches‘]:
print (‘IP: %s‘ % result[‘ip_str‘])
print (result[‘data‘])
print (‘‘)
except shodan.APIError as e:
print (‘Error: %s‘ % e)
 
 技术分享

 

 

python写端口批量扫描器

标签:.com   logs   for   .sh   开始   span   div   ges   error:   

原文地址:http://www.cnblogs.com/haq5201314/p/7373637.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!