ITPub博客

首页 > IT职业 > IT图书 > Python中shodan模块是什么?

Python中shodan模块是什么?

IT图书 作者:wangsys 时间:2021-09-11 10:03:38 0 删除 编辑

 

本文教程操作环境:windows7系统、Python 3.9.1,DELL G3电脑。

shodan模块安装:

pip install shodan

常用函数:

shodan.Shodan(key)
Shodan.ports()
Shodan.services()

实例应用:

import shodan   
try:
    results=api.search('apache')    
    print(results)
    print("Results found:%s"%results['total'])
    for result in results['matches']:
        print(result['ip_str'])

 上述为大家介绍的就是关于shodan模块最主要的用法,便于大家掌握了解,基本上都整理出来了,感兴趣的小伙伴可以多尝试了解下哦~

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3244/viewspace-2831399/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-09-06

  • 博文量
    94
  • 访问量
    7080