/usr/share/w3af/extlib/nltk/README.w3af is in w3af-console 1.0-rc3svn3489-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | I slightly modified this package to be able to embed wordnet with w3af.
The wordnet database was added in "nltk/nltk_data/corpora/wordnet/".
And the data.py file, which loads the data packages, was modified to look for the nltk_data inside
the nltk directory:
$ diff nltk/data.py.orig nltk/data.py
67a68,73
> # Try the embebed nltk_data directory first
> from nltk import __file__
> nltk_install_dir = os.path.dirname( __file__ )
> embebed_data_dir = os.path.join( nltk_install_dir, 'nltk_data' )
> path.append(embebed_data_dir)
>
I then tried to change the whole nltk module in order to be able to use it even if nltk was
installed in the operating system, so I tried:
dz0@brick:~/w3af/w3af/trunk/extlib/nltk$ find . -name '*.py' | xargs perl -pi -w -e 's/import nltk/import extlib\.nltk as nltk/g;'
dz0@brick:~/w3af/w3af/trunk/extlib/nltk$ find . -name '*.py' | xargs perl -pi -w -e 's/from nltk\./from extlib\.nltk\./g;'
dz0@brick:~/w3af/w3af/trunk/extlib/nltk$ find . -name '*.py' | xargs perl -pi -w -e 's/from nltk import/from extlib\.nltk import/g;'
But this ain't working. I need to dedicate more time to it.
|