File: README.w3af

package info (click to toggle)
w3af 1.0-rc3svn3489-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 59,908 kB
  • ctags: 16,916
  • sloc: python: 136,990; xml: 63,472; sh: 153; ruby: 94; makefile: 40; asm: 35; jsp: 32; perl: 18; php: 5
file content (25 lines) | stat: -rw-r--r-- 1,126 bytes parent folder | download
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.