Why the title? Well its a goal of mine to turn these snippets of mine into an exploit framework. So enjoy!
RPython is a restricted subset of python RPython (Restricted Python) is statically typed
What will we cover in this tutorial is setting up an environment for building exploits in RPython
First you will need to download PyPy and MinGW
(the pypy translator is only available in the source of PyPy we will need translate.py later to compile the executable. So get the latest source using Mercurial)
Download Mercurial here http://mercurial.selenic.com and install it. Using Mercurial run this command from your cmd prompt
Now you will have PyPy downloaded. I just moved it to the directory C:\pypy for easy reference. Next we will add an Environment Variable to the directory containing translate.py it should be in C:\pypy\pypy\translator\goal\ the file translate.py will be in this goal directoryhg clone https://bitbucket.org/pypy/pypy
Now you will need to install MinGW
http://sourceforge.net/projects/mingw/f ... -get-inst/
Installing the C++ compiler and the MSYS tools also
pretty much everything, although you don't need the J++ compiler or csharp compiler I think they had
Add the bin directory of MinGW to your path as well as \msys\1.0\bin; so if you installed MinGW to to C:\MinGW it would be C:\MinGW\bin and C:\MinGW\msys\1.0\bin;
Now download the libffi source http://sourceware.org/libffi/ once again this will allow for CTypes in PyPy and MingWYou will need to use MinGW to compile a dll before we can start. This is so we can use CTYPES. MinGW will also be our compiler for RPython
cd to the libffi source directory and type
Code: Select all
sh ./configure
make
Next add this to a folder on your C drive and add it to your Environment Variable/Pathlibffi-5.dll
Now you should be able to compile the source attached to this post
type in cmd
Code: Select all
translate.py --cc=mingw32 --output test.exe test.py