The fisr scan script coded by python
2015-11-20 16:39
489 查看
第一个SCAN程序,菜鸟级别的入门,写在此,也算是种学习纪念。
#scan.py import socket ports = [80,8080] hosts = ['www.freebuf.com','www.baidu.com','www.sina.com'] for host in hosts: for port in ports: try: s = socket.socket() print "[+]Attempting to connect to " + host + ":" + str(port) s.connect((host,port)) s.send('agsdfd \n') banner = s.recv(1024) if banner: print "[+]" + host + ":" + str(port) + " open \n" + "[+]The banner infomations are below: \n" + banner s.close() except: pass
相关文章推荐
- To Summarize the Error of Ipython Notebook
- Getting Started with Salt Stack-the Other Configuration Management System Built with Python
- python Queue的多线程应用
- 王亟亟的Python学习之路(七)-date,continue,迭代对象,生成器
- 王亟亟的Python学习之路(七)-date,continue,迭代对象,生成器
- python 字符串与数字之间的转换
- 爬虫框架Scrapy实战之批量抓取招聘信息
- Python 实现双向链表(图解)
- python opencv 人脸识别
- Python 对谷歌协议文件 .proto 文件的生成与处理 (python 命令、查找、替换)
- 使用Python处理excel表格(openpyxl)及表格中的中文处理
- 关于在windows平台下使用ipython运行pyspark的问题
- Python中sorted()方法的用法
- Python编程中使用Pillow来处理图像的基础教程
- [python]print简单用法和读取用户输入
- python 读写JSON数据
- 在Mac OS系统上安装Python的Pillow库的教程
- 详解Python编程中time模块的使用
- Python多进程编程
- Windows上配置Emacs来开发Python及用Python扩展Emacs