随笔分类 -  python

python总结模块
摘要:前两天遇到的一个问题,起源是在某个数据包里看到url=这个关键字,当时第一想到会不会有SSRF漏洞。 以前乌云上有很多从SSRF打到内网并执行命令的案例,比如有通过SSRF+S2-016漏洞漫游内网的案例,十分经典。不过当时拿到这个目标,我只是想确认一下他是不是SSRF漏洞,没想到后面找到了很多有趣 阅读全文
posted @ 2017-11-27 14:54 blacksunny 阅读(1046) 评论(0) 推荐(0)
摘要:以太网网卡的工作模式: 常见的以太网卡支持以下工作模式:广播模式、多播模式、直接模式和混杂模式。 设置网卡为混杂模式 我们可以通过ifconfig和iwconfig配置网络接口的信息。 ifconfig eth0 promisc 将eth0设置为混杂模式 ifconfig eth0 -promisc 阅读全文
posted @ 2017-06-16 14:27 blacksunny 阅读(1103) 评论(0) 推荐(0)
摘要:我是安装了sulley,这里安装了pcapy的模块。 https://github.com/zlorb/scapy 按照此链接的步骤安装 但是在安装pycrypto模块出现了错误。 这里通过pip安装,会出现没法找到chmod命令。 建议用easy_install来安装。链接如下easy_insta 阅读全文
posted @ 2016-10-28 15:56 blacksunny 阅读(392) 评论(0) 推荐(0)
摘要:urllib和urllib2都是接受URL请求的相关模块,但是提供了不同功能。 urllib2可以接受一个Request类的实例来设置URL请求的headers,urllib仅可以接受URL。这意味着,你不可以伪装你的User Agent字符串等会。 urllib提供urlencode方式用来GET 阅读全文
posted @ 2016-07-26 10:43 blacksunny 阅读(209) 评论(0) 推荐(0)
摘要:http://xael.org/pages/python-nmap-en.html nmap模块 http://www.tutorialspoint.com/python/python_multithreading.htm 多线程 http://www.cnblogs.com/tqsummer/ar 阅读全文
posted @ 2016-07-13 21:25 blacksunny 阅读(2152) 评论(0) 推荐(0)
摘要:http://scrapy-chs.readthedocs.io/zh_CN/0.24/intro/tutorial.html 手册 https://github.com/yidao620c/core-scrapy github实例 http://www.cnblogs.com/xuanhun/p/ 阅读全文
posted @ 2016-07-06 17:53 blacksunny 阅读(143) 评论(0) 推荐(0)
摘要:https://thepacketgeek.com/scapy-p-04-looking-at-packets/ http://biot.com/capstats/bpf.html filter语法 http://www.secdev.org/projects/scapy/doc/usage.htm 阅读全文
posted @ 2016-06-24 16:55 blacksunny 阅读(1650) 评论(0) 推荐(0)
摘要:使用optionParse解析命令行参数分以下几个步骤: 代码展示 from optparse import OptionParser parser = OptionParser(...) parser.add_option(.....) 参数介绍 阅读全文
posted @ 2016-03-24 14:50 blacksunny 阅读(14054) 评论(1) 推荐(1)
摘要:1.性能 Py3.0运行 pystone benchmark的速度比Py2.5慢30%。Guido认为Py3.0有极大的优化空间,在字符串和整形操作上可 以取得很好的优化结果。 Py3.1性能比Py2.5慢15%,还有很大的提升空间。 2.编码 Py3.X源码文件默认使用utf-8编码,这就使得以下 阅读全文
posted @ 2016-01-14 10:41 blacksunny