Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing PyV8 in Kali for use with peepdf
Installing PyV8 in Kali for use with peepdf
Kali 2016.1 rolling comes with peepdf 0.3, but it doesn't at present have PyV8 for javascript. peepdf may tell you this sad news. Here, we find out how to be happier.
First, we solve some dependencies. v8 relies upon boost. The dependencies aren't packaged up nicely, so builds will fail. You can fix that with an apt-get of dev packages
apt-get install libboost-python-dev
apt-get install libboost-thread-dev
Then we get v8 and PyV8 from old googlecode and put them in /usr/local/src
cd /usr/local/src
svn checkout http://pyv8.googlecode.com/svn/trunk/ pyv8
svn checkout http://v8.googlecode.com/svn/trunk/ v8
Next we teach pyv8 how to find v8
export V8_HOME=/usr/local/src/v8
export PyV8=/usr/local/src/v8 # probably unnecessary
Finally, we build and install. The build process will update v8, pyv8, and large prereqs (GYP) from googlecode
cd /usr/local/src/pyv8
python setup.py build
python setup.py install
Run peepdf and see it find pyv8, to parse javascript
Future work would involve redoing the PyV8 install so it uses the updated Google git version of v8 and ancillary parts. Start here: https://github.com/v8/v8/wiki and https://github.com/v8/v8/wiki/Using%20Git (don't just directly clone https://chromium.googlesource.com/v8/v8.git or http://github.com/v8/v8-git-mirror)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment