1

I am now stuck at installing "python-pip" by doing as the error code say, just say it can not find that package. So I install it based on the python documentation via "sudo python get-pip.py" after downloading it, but no. It still say that it is not installed(have checked that it is in the PATH, and it is).

w3af's requirements are not met, one or more third-party libraries need to be installed.

On Kali systems please install the following operating system packages before running the pip installer: sudo apt-get -y install python-pip

Your python installation needs the following modules to run w3af: pyclamd github git.util pybloomfilter phply nltk tblib pdfminer concurrent.futures OpenSSL ndg pyasn1 lxml scapy.config guess_language cluster msgpack ntlm Halberd darts.lib.utils jinja2 vulndb markdown psutil ds_store termcolor mitmproxy ruamel.ordereddict Flask yaml tldextract pebble acora esmre diff_match_patch bravado_core lz4 vulners ipaddresses subprocess32

After installing any missing operating system packages, use pip to install the remaining modules: sudo pip install pyClamd==0.4.0 PyGithub==1.21.0 GitPython==2.1.3 pybloomfiltermmap==0.3.14 phply==0.9.1 nltk==3.0.1 tblib==0.2.0 pdfminer==20140328 futures==3.2.0 pyOpenSSL==18.0.0 ndg-httpsclient==0.4.0 pyasn1==0.4.2 lxml==3.4.4 scapy==2.4.0 guess-language==0.2 cluster==1.1.1b3 msgpack==0.5.6 python-ntlm==1.0.1 halberd==0.2.4 darts.util.lru==0.5 Jinja2==2.10 vulndb==0.1.1 markdown==2.6.1 psutil==5.4.8 ds-store==1.1.2 termcolor==1.1.0 mitmproxy==0.13 ruamel.ordereddict==0.4.8 Flask==0.10.1 PyYAML==3.12 tldextract==1.7.2 pebble==4.3.8 acora==2.1 esmre==0.3.1 diff-match-patch==20121119 bravado-core==5.12.1 lz4==1.1.0 vulners==1.3.0 ipaddresses==0.0.2 subprocess32==3.5.4

External programs used by w3af are not installed or were not found.Run these commands to install them on your system:

npm install -g retire@2.0.3
npm update -g retire

According to Kali's documentation [0] in order to avoid breaking the packaged w3af version you should run the following commands:

cd ~ apt-get install -y python-pip pip install --upgrade pip git clone https/github.com/andresriancho/w3af.git cd w3af ./w3af_console . /tmp/w3af_dependency_install.sh

[0] http://www.kali.org/kali-monday/bleeding-edge-kali-repositories/

A script with these commands has been created for you at /tmp/w3af_dependency_install.sh

Reading in the kali documentation they say that you should not modify sources.list so how the hell should I do it? Spent my entire day on this. I take a course in web security and have a choice between w3af and arachni scanner to find harder XSS exploits. Arachni I have given up on because it want msgpack to be installed, and I have installed it outside "bundle install", since it fails when using "bundle install" as the pictures below shows.

ali@kali:~/Downloads/arachni$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 11.3.0
Following files may not be writable, so sudo is needed:
  /usr/local/bin                                                                                                                                                                                                                           
  /var/lib/gems/2.7.0                                                                                                                                                                                                                      
  /var/lib/gems/2.7.0/build_info                                                                                                                                                                                                           
  /var/lib/gems/2.7.0/cache                                                                                                                                                                                                                
  /var/lib/gems/2.7.0/doc                                                                                                                                                                                                                  
  /var/lib/gems/2.7.0/extensions                                                                                                                                                                                                           
  /var/lib/gems/2.7.0/gems                                                                                                                                                                                                                 
  /var/lib/gems/2.7.0/specifications                                                                                                                                                                                                       
Using addressable 2.3.6
Using arachni-reactor 0.1.2
Using arachni-rpc 0.2.1.4
Using awesome_print 1.6.1
Using bundler 2.1.4
Using ffi 1.12.2
Using childprocess 0.5.3
Using coderay 1.1.0
Using concurrent-ruby 1.0.2
Using concurrent-ruby-ext 1.0.2
Using http_parser.rb 0.6.0
Using kramdown 1.4.1
Using mini_portile2 2.1.0
Using nokogiri 1.6.8.1
Using loofah 2.0.3
Fetching msgpack 0.7.0


Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password: 


Your user account isn't allowed to install to the system RubyGems.
  You can cancel this installation and run:

      bundle install --path vendor/bundle

  to install the gems into ./vendor/bundle/, or you can enter your password
  and install the bundled gems to RubyGems using sudo.

  Password: 
Installing msgpack 0.7.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /tmp/bundler20200428-6044-btnsn7msgpack-0.7.0/gems/msgpack-0.7.0/ext/msgpack
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20200428-6044-1by26ez.rb extconf.rb
checking for ruby/st.h... yes
checking for st.h... yes
checking for rb_str_replace() in ruby.h... yes
checking for rb_intern_str() in ruby.h... yes
checking for rb_sym2str() in ruby.h... yes
checking for rb_str_intern() in ruby.h... yes
checking for rb_block_lambda() in ruby.h... yes
checking for rb_hash_dup() in ruby.h... yes
checking for rb_hash_clear() in ruby.h... yes
creating Makefile

current directory: /tmp/bundler20200428-6044-btnsn7msgpack-0.7.0/gems/msgpack-0.7.0/ext/msgpack
make "DESTDIR=" clean

current directory: /tmp/bundler20200428-6044-btnsn7msgpack-0.7.0/gems/msgpack-0.7.0/ext/msgpack
make "DESTDIR="
compiling buffer.c
compiling buffer_class.c
buffer_class.c: In function ‘read_until_eof’:
buffer_class.c:261:17: warning: passing argument 3 of ‘rb_rescue2’ from incompatible pointer type [-Wincompatible-pointer-types]
  261 |                 read_until_eof_error, (VALUE)(void*) args,
      |                 ^~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 VALUE (*)(VALUE) {aka long unsigned int (*)(long unsigned int)}
In file included from /usr/include/ruby-2.7.0/ruby.h:33,
                 from compat.h:22,
                 from buffer_class.c:19:
/usr/include/ruby-2.7.0/ruby/ruby.h:1988:40: note: expected ‘VALUE (*)(VALUE,  VALUE)’ {aka ‘long unsigned int (*)(long unsigned int,  long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long
unsigned int)’}
 1988 | VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
      |                                        ^~~~~~~~~~~~~~~~~~~~~
compiling core_ext.c
In file included from /usr/include/ruby-2.7.0/ruby.h:33,
                 from compat.h:22,
                 from core_ext.h:21,
                 from core_ext.c:19:
core_ext.c: In function ‘MessagePack_core_ext_module_init’:
core_ext.c:135:22: error: ‘rb_cFixnum’ undeclared (first use in this function)
  135 |     rb_define_method(rb_cFixnum, "to_msgpack", Fixnum_to_msgpack, -1);
      |                      ^~~~~~~~~~
/usr/include/ruby-2.7.0/ruby/ruby.h:2799:104: note: in definition of macro ‘rb_define_method’
 2799 | #define rb_define_method(klass, mid, func, arity) rb_define_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
      |                                                                                                        ^~~~~
core_ext.c:135:22: note: each undeclared identifier is reported only once for each function it appears in
  135 |     rb_define_method(rb_cFixnum, "to_msgpack", Fixnum_to_msgpack, -1);
      |                      ^~~~~~~~~~
/usr/include/ruby-2.7.0/ruby/ruby.h:2799:104: note: in definition of macro ‘rb_define_method’
 2799 | #define rb_define_method(klass, mid, func, arity) rb_define_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
      |                                                                                                        ^~~~~
core_ext.c:136:22: error: ‘rb_cBignum’ undeclared (first use in this function)
  136 |     rb_define_method(rb_cBignum, "to_msgpack", Bignum_to_msgpack, -1);
      |                      ^~~~~~~~~~
/usr/include/ruby-2.7.0/ruby/ruby.h:2799:104: note: in definition of macro ‘rb_define_method’
 2799 | #define rb_define_method(klass, mid, func, arity) rb_define_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
      |                                                                                                        ^~~~~
make: *** [Makefile:245: core_ext.o] Error 1

make failed, exit code 2

Gem files will remain installed in /tmp/bundler20200428-6044-btnsn7msgpack-0.7.0/gems/msgpack-0.7.0 for inspection.
Results logged to /tmp/bundler20200428-6044-btnsn7msgpack-0.7.0/extensions/x86_64-linux/2.7.0/msgpack-0.7.0/gem_make.out

An error occurred while installing msgpack (0.7.0), and Bundler cannot continue.
Make sure that `gem install msgpack -v '0.7.0' --source 'https://rubygems.org/'` succeeds before bundling.                                                                                                                                 

In Gemfile:
  arachni was resolved to 1.5.1, which depends on
    msgpack

Can someone please help me? I have the newest "installation" media of Kali Linux

7
  • 1
    please remove the pictures from your post .... replace them with the actual text, so that we can copy the text and do internet searches
    – jsotola
    Apr 28 '20 at 19:23
  • Ok, yes did not think about that. Get on it right away
    – Salviati
    Apr 28 '20 at 19:24
  • Have you tried to run apt-get update && apt-get install python-pip? That should be provided by Kali and should not require changing anything. That should help with installing the python requirements you need. You should be able to install ruby-msgpack as well. Please provide more information about the errors you get when trying to use apt-get. Do not use images, please copy the text into your question. Apr 28 '20 at 19:41
  • @jsotola I think it is a complete mess now, can not even myself see where is what, But anyway, it is done. Do you have any formatting tip so it is more simple to read?
    – Salviati
    Apr 28 '20 at 19:59
  • @GracefulRestart Yes I have. The whole system was up to date when I installed it. If you download the newest virtualbox on a debian 10 machine with the newest kali linux 64 bit installation the same errors occure. Tried it on 7 different computers now.
    – Salviati
    Apr 28 '20 at 20:00
1

w3af and arachni has been removed from kali-linux (Arachni is no longer maintained). But you can install them on Debian Jessie (debian 8).

w3af

w3af is available on debian jessie, it can be installed through apt:

apt install w3af

Edit the /usr/bin/w3af_console file, change 2.5 to 2.7:

#!/bin/sh
if [ -r /usr/share/w3af/w3af_console ] ; then 
   /usr/bin/python2.5 /usr/share/w3af/w3af_console $@
fi

to

#!/bin/sh
if [ -r /usr/share/w3af/w3af_console ] ; then 
   /usr/bin/python2.7 /usr/share/w3af/w3af_console $@
fi

arachni

Following the installation guide: Source based

Arachni will run in any *nix environment that satisfies the following dependencies:

  • Ruby 2.2.0 up to 2.3.3.
    • libcurl with OpenSSL support.
    • C/C++ compilers and GNU make in order to build the necessary extensions.

Install the dependencies:

apt-get install build-essential curl libcurl3 libcurl4-openssl-dev ruby ruby-dev
apt-get install zlib1g-dev liblzma-dev

Install rvm following the official guide

gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable --ruby

Then install a ruby version 2.2.0 up to 2.3.3.(on debian jessie the default version is 2.1)

source /usr/local/rvm/scripts/rvm
rvm install ruby 2.3.0
rvm use 2.3.0 --default
gem update --system --no-document
gem install bundler nokogiri --no-document

Install arachni:

gem install arachni 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.