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)
![](https://images2017.cnblogs.com/blog/1174022/201708/1174022-20170816153525787-644802667.png)