随笔分类 - Python
摘要:[root@localhost]# yum-complete-transactionTraceback (most recent call last): File "/usr/sbin/yum-complete-transaction", line 20, in <module> import yu
阅读全文
摘要:有2个常有插件,一个是xpath checker,一个是firepath(配合firebug)xpath checker是个好东西,不仅可以分析,还可以验证自己抽取的xpath是否正确但xpath checker 是遵从xpath2.0 , 而scrapy则是遵循xpath1.0,因此会出现不兼容的情况。使用过程中我就遇到了xpath checker中正常获取但是在scrapy程序中无法正常解析的情况。信息源自:https://groups.google.com/forum/#!msg/scrapy-users/5qdzooT8RXg/Ttvm4ublTu0J建议使用firepath,这个插件
阅读全文
摘要:1、相对路径导致2、环境变量问题,py脚本首行应指定python路径,不能用软链接3、python3.3是默认utf-8,需要exportLANG=en_US.UTF-8&&脚本最好使用crontab -e ,这样如果任务执行有问题,会有mail通知,可以帮助查找原因。如果直接编辑/etc/crontab则没有通知。
阅读全文
摘要:''' Syn flood program in python by Tequila/e credits to Silver Moon for base's of syn packets. r s s y n''' # some importsimport socket, sys, osimport threadingimport timeimport threadfrom struct import *if len(sys.argv) "); sys.exit();# checksum functions needed for
阅读全文
摘要:1、加载界面感觉上和webravor神似,可以自己编写测试脚本,支持Python和Ruby;2、0.9.5版本改进很大,不错。且扫描策略有亮点:如cookie缺乏HttpOnly属性3、开源。提供开发环境支持。以后自己写扫描器的话,也要学习下IronWASP4、支持导入burp日志,习惯使用burpsuite的童鞋有福了作者为印度人:Lavakumar Kuppan(http://in.linkedin.com/in/lavakumark)
阅读全文
摘要:报错如下:./sqlmap.py File "./sqlmap.py", line 119 finally: ^ 原因在于:centos5.6 中的python版本低,而sqlmap需要python2.6或2.7的支持。解决方案:升级python到2.7.3 (参考:http://www.qwolf.com/?p=1166)首先查看python版本:python -V1.先安装GCCyum -y install gcc2.下载Python-2.7.3[root@localhost ~] wget http://python.org/ftp/python/2.7....
阅读全文
摘要:radius = input("What is the radius?")square = radius*radius*3.14print 'The square is '+ square以上代码运行会报错。原因如下:Python与Java不同,「+」运算符不会自动将整型等其他类型转换为字符串类型。为了连接不同类型的变量,str()函数可以将这些变量转换为字符串类型。修改如下,即可成功运行:print 'The square is '+ str(square)
阅读全文

浙公网安备 33010602011771号