Translate

Showing posts with label w3af. Show all posts
Showing posts with label w3af. Show all posts

Saturday, 14 December 2013

w3af : ImportError: cannot import name process_pdf




w3af Installing w3af.

- after cloaning w3af from git clone https://github.com/andresriancho/w3af.git running ./w3af shows install missing packages of OS and python.
- w3af generate script of missing requirements in /tmp/ directory.
- Missing packages installed by running script.
- some packages are not installed.
- pysvn and scapy installed manually by pip install http://link-to-package
Prolem:
after running ./w3af_console it shows pdf_process error at last.
ImportError: cannot import name process_pdf
Traceback (most recent call last):
File "./w3af_console", line 25, in <module>
from core.ui.console.console_ui import ConsoleUI
File "/home/w3af/core/ui/console/console_ui.py", line 42, in <module>
from core.controllers.w3afCore import w3afCore
File "/home/w3af/core/controllers/w3afCore.py", line 36, in <module>
from core.controllers.core_helpers.strategy import w3af_core_strategy
File "/home/w3af/core/controllers/core_helpers/strategy.py", line 30, in <module>
from core.data.url.extended_urllib import MAX_ERROR_COUNT
File "/home/w3af/core/data/url/extended_urllib.py", line 45, in <module>
from core.data.parsers.HTTPRequestParser import HTTPRequestParser
File "/home/w3af/core/data/parsers/HTTPRequestParser.py", line 26, in <module>
from core.data.request.factory import create_fuzzable_request_from_parts
File "/home/w3af/core/data/request/factory.py", line 29, in <module>
import core.data.parsers.parser_cache as parser_cache
File "/home/w3af/core/data/parsers/parser_cache.py", line 26, in <module>
import core.data.parsers.document_parser as DocumentParser
File "/home/w3af/core/data/parsers/document_parser.py", line 25, in <module>
from core.data.parsers.pdf import PDFParser, pdf_to_text
File "/home/w3af/core/data/parsers/pdf.py", line 26, in <module>
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter, process_pdf
ImportError: cannot import name process_pdf

Solution:
It is only due to this missing package phply

w3af plugins.grep.clamav: "No module named six"."

If you are getting this error on running ./w3af_console

Error while reading plugin options: "There was an error while importing plugins.grep.clamav: "No module named six"."

then
Solution :

apt-get install python-six :)

w3af not sending email , not even saving any configurations.


If w3af not saving any configurations then there is issue which can be resolved by recloaning w3af. And following instructions on console. Console might say to install phply. A command to install will also be there.

If w3af not sending email then make sure following.

Make sure mailutils and sendmail is installed.
Use sender domain.
Sender domain other than gmail. For example abc@yahoo.com.
Still not receiving email in gmail. Gmail might have black listed your ip. Change sender and receiver emails of yahoo domain.
Still having trouble.
Checking of logs is necessary.
/var/log/syslog
/var/log/mail.log

Saturday, 30 November 2013

w3af Discovery plugin missing. w3af version 1.6

May be you see this message on running latest cloned w3af. (version 1.6)
The profile you are trying to load (fast_scan) seems to be outdated, this is a common issue which happens when the framework is updated and one of its plugins adds/removes one of the configuration parameters referenced by a profile, or the plugin is removed all together.
So dont worry here is solution.

-- w3af installation guide is good document to study how to install w3af.
-- w3af installation needs several python plugins to work.
-- use pip or easy_install to install these packages.
-- Details of these packages are given in Guide.
-- pdfminer is also a python plugin required.
-- after installation when running ./w3af_console. w3af automatically console generate bash script to install remaining plugins.
-- the problem was in after running ./w3af_console , profiles --> use fast_scan w3af shows above message.
-- Searching the problem results in following link. You can also read from this link but i have also mentioned problem and solution in this post.
-- This message is usually due to that you have several attempts to install w3af on ubuntu.
--Problem was that latest cloned w3af use previous installation files which are in .w3af directory.
-- After removing this directory rm -r .w3af.. ./w3af_console works fine.
-- w3af installation is complete on ubuntu
-- w3af may say that again some plugin is missing. At least in my case it says that. But dont worry just install missing plugin from script automatically created by w3af in /tmp/ directory or read the message carefully it will guide you where is bash script placed by w3af.
-- simply run script using by moving to directory and entering ./dependency_fileName.sh. w3af should work now.
-- If you still have issue then you can also post new issue by registering into github and using this link. https://github.com/andresriancho/w3af/issues/144
click on new issue. write all used method of installation and python version ,installed python packages , gtk version , and error message as well.