Python中shodan模块是什么?

2023-12-14 10:49:44网络知识悟空

python中shodan模块是什么?

本文教程操作环境:windows7系统、Python3.9.1,DELLG3电脑。

shodan模块安装:

pipinstallshodan

常用函数:

shodan.Shodan(key)

Shodan.ports()

Shodan.services()

实例应用:

importshodan

try:

results=api.search('apache')

print(results)

print("Resultsfound:%s"%results['total'])

forresultinresults['matches']:

print(result['ip_str'])

上述为大家介绍的就是关于shodan模块最主要的用法,便于大家掌握了解,基本上都整理出来了,感兴趣的小伙伴可以多尝试了解下哦~更多Python学习教程请关注IT培训机构:筋斗云。

发表评论: