wfuzz 在 RedHat OS 上试用(一)

1、https://code.google.com/p/wfuzz/downloads/list 下载wfuzz,解压

2、运行命令:

[root@localhost wfuzz-read-only]# python wfuzz.py  -z file -f wordlist/general/common.txt  --hc 404 http://192.168.65.155/FUZZ
Traceback (most recent call last):
  File "wfuzz.py", line 6, in ?
    from reqresp import *
  File "/home/test/Desktop/pentestingtools/wfuzz-read-only/reqresp.py", line 7, in ?
    import pycurl
ImportError: No module named pycurl

提示缺少pycurl

3、在http://pycurl.sourceforge.net/上下载 pycurl源码包后,安装提示出错:

[root@localhost pycurl-7.19.3.1]# python setup.py  install
Traceback (most recent call last):
  File "setup.py", line 563, in ?
    ext = get_extension()
  File "setup.py", line 368, in get_extension
    ext_config = ExtensionConfiguration()
  File "setup.py", line 65, in __init__
    self.configure()
  File "setup.py", line 100, in configure_unix
    raise ConfigurationError(msg)
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory

 抱着试试的想法,运行: yum install python-pycurl ,还真装上了 o year!!!

4、继续第2步的命令,又提示出错:

[root@localhost wfuzz-read-only]# python wfuzz.py  -z file -f wordlist/general/common.txt  --hc 404 http://192.168.65.155/FUZZ
Traceback (most recent call last):
  File "wfuzz.py", line 13, in ?
    import iterations
  File "/home/test/Desktop/pentestingtools/wfuzz-read-only/iterations.py", line 13, in ?
    class iterator_product(itertools.product):
AttributeError: 'module' object has no attribute 'product'
经google发现可能是python版本过低造成的

5、升级python:http://blog.youkuaiyun.com/yoeen/article/details/6870170

6、升级后运行第2步命令发现又一次的出现No module named pycurl, 再一次使用yum install发现提示已经安装了,分析可以发现 :yum装的pycurl是为原来的低版本的python使用的,故需要想其他办法装 pycurl,考虑使用easy_install.

7、安装easy_install:

      执行命令: curl -O http://python-distribute.org/distribute_setup.py  获取distribute_setup.py

       然后执行: python distribute_setup.py
       提出出错:

  Traceback (most recent call last):
  File "distribute_setup.py", line 556, in <module>
    sys.exit(main())
  File "distribute_setup.py", line 552, in main
    tarball = download_setuptools(download_base=options.download_base)
  File "distribute_setup.py", line 211, in download_setuptools
    src = urlopen(url)
  File "/usr/local/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/local/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/lib/python2.7/urllib2.py", line 442, in error
    result = self._call_chain(*args)
  File "/usr/local/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/urllib2.py", line 629, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/local/lib/python2.7/urllib2.py", line 427, in _open
    'unknown_open', req)
  File "/usr/local/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/urllib2.py", line 1247, in unknown_open
    raise URLError('unknown url type: %s' % type)
urllib2.URLError: <urlopen error unknown url type: https>

解决方法:安装openssl 开发包: yum install openssl-devel

然后再次运行: python distribute_setup.py
8、使用easy_install 安装 pycurl:

[root@localhost Python-2.7.6]# python distribute_setup.py
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz
Traceback (most recent call last):
  File "distribute_setup.py", line 556, in <module>
    sys.exit(main())
  File "distribute_setup.py", line 552, in main
    tarball = download_setuptools(download_base=options.download_base)
  File "distribute_setup.py", line 211, in download_setuptools
    src = urlopen(url)
  File "/usr/local/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 410, in open
    response = meth(req, response)
  File "/usr/local/lib/python2.7/urllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/local/lib/python2.7/urllib2.py", line 442, in error
    result = self._call_chain(*args)
  File "/usr/local/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/urllib2.py", line 629, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "/usr/local/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/local/lib/python2.7/urllib2.py", line 427, in _open
    'unknown_open', req)
  File "/usr/local/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/urllib2.py", line 1247, in unknown_open
    raise URLError('unknown url type: %s' % type)
urllib2.URLError: <urlopen error unknown url type: https>
[root@localhost Python-2.7.6]# python wfuzz.py  -z file -f wordlist/general/common.txt  --hc 404 http://192.168.65.155/FUZZ
python: can't open file 'wfuzz.py': [Errno 2] No such file or directory
[root@localhost Python-2.7.6]# cd ../
[root@localhost pentestingtools]# cd wfuzz-read-only/
[root@localhost wfuzz-read-only]# l
bash: l: command not found
[root@localhost wfuzz-read-only]# python wfuzz.py  -z file -f wordlist/general/common.txt  --hc 404 http://192.168.65.155/FUZZ
Traceback (most recent call last):
  File "wfuzz.py", line 6, in <module>
    from reqresp import *
  File "/home/test/Desktop/pentestingtools/wfuzz-read-only/reqresp.py", line 7, in <module>
    import pycurl
ImportError: No module named pycurl
[root@localhost wfuzz-read-only]# easy_install pycurl
Searching for pycurl
Reading http://pypi.python.org/simple/pycurl/
Best match: pycurl 7.19.3.1
Downloading https://pypi.python.org/packages/source/p/pycurl/pycurl-7.19.3.1.tar.gz#md5=6df8fa7fe8b680d93248da1f8d4fcd12
Processing pycurl-7.19.3.1.tar.gz
Writing /tmp/easy_install-Ycp44a/pycurl-7.19.3.1/setup.cfg
Running pycurl-7.19.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Ycp44a/pycurl-7.19.3.1/egg-dist-tmp-Wm60HV
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 9, in <module>
    load_entry_point('distribute==0.6.49', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 1973, in main
    with_ei_usage(lambda:
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 1954, in with_ei_usage
    return f()
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 1977, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 360, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 604, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 634, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 829, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 1109, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/command/easy_install.py", line 1095, in run_setup
    run_setup(setup_script, args)
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/sandbox.py", line 33, in run_setup
    lambda: execfile(
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/sandbox.py", line 81, in run
    return func()
  File "/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/setuptools/sandbox.py", line 35, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 563, in <module>
  File "setup.py", line 368, in get_extension
  File "setup.py", line 65, in __init__
  File "setup.py", line 100, in configure_unix
__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory
参照:http://www.douban.com/note/205693536/

[root@qilincaizhe-vmlnx ~]#wget http://curl.haxx.se/download/curl-7.24.0.tar.gz
[root@qilincaizhe-vmlnx ~]#tar -zxvf curl-7.24.0.tar.gz
[root@qilincaizhe-vmlnx ~]#cd curl-7.24
[root@qilincaizhe-vmlnx curl-7.24.0]#./configure
[root@qilincaizhe-vmlnx curl-7.24.0]#make
[root@qilincaizhe-vmlnx curl-7.24.0]#make install

安装curl-config,然后运行easy_install pycurl安装pycurl

9、再次执行第2步中的命令

[root@localhost wfuzz-read-only]# python wfuzz.py  -z file -f wordlist/general/common.txt  --hc 404 http://192.168.65.155/FUZZ
Traceback (most recent call last):
  File "wfuzz.py", line 6, in <module>
    from reqresp import *
  File "/home/test/Desktop/pentestingtools/wfuzz-read-only/reqresp.py", line 7, in <module>
    import pycurl
ImportError: libcurl.so.4: cannot open shared object file: No such file or directory

o my god 没完了,继续解决吧

find / -name libcurl.so.4

发现libcurl.so.4在/usr/local/lib内,于是制作一个软链接:

ln -s /usr/local/lib/libcurl.so.4.2.0  /usr/lib/libcurl.so.4

再次执行第2步的命令:

[root@localhost wfuzz-read-only]# python wfuzz.py  -z file -f wordlist/general/common.txt  --hc 404 http://192.168.65.155/FUZZ
Traceback (most recent call last):
  File "wfuzz.py", line 730, in <module>
    t, par = vals[:2]
ValueError: need more than 1 value to unpack

仔细查看代码,发现 命令写错了,O 靠来:

 python wfuzz.py  -z file,wordlist/general/common.txt  --hc 404 -o html  http://192.168.65.155/FUZZ.php

可以正常执行了终于~~~~~





       

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值