python写端口批量扫描器

 用到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)
 
 

 

 

posted on 2017-08-16 15:36  东京$  阅读(1223)  评论(0编辑  收藏  举报

导航