waliedassar

Decoder For CyberGate XX-XX-XX-XX Resource

Apr 24th, 2015
313
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Blog post: http://middleeastmalware.blogspot.com/2015/04/cyber-attack-9.html
  2. import sys,os,time
  3.  
  4.  
  5. def DecodeCyberGate(InputFileX):
  6.     if os.path.exists(InputFileX)==False:
  7.         print "File does not exist\r\n"
  8.         return
  9.     fIn = open(InputFileX,"r")
  10.     contentX = fIn.read()
  11.     fIn.close()
  12.     if len(contentX)==0:
  13.         print "File is empty\r\n"
  14.         return
  15.     else:
  16.         print "Processing input of length " + str(len(contentX))
  17.  
  18.     DecodedContent = ""
  19.     for CX in contentX:
  20.         int_CX = ord(CX)
  21.         int_key = int(188)
  22.         DecodedContent = DecodedContent +  chr(int_CX ^ int_key)
  23.  
  24.     print DecodedContent
  25.    
  26.     fOut = open("result.txt","wb")
  27.     fOut.write(DecodedContent)
  28.     fOut.close()
  29.     return
  30.  
  31. def main():
  32.     if len(sys.argv)!=2:
  33.         print "Usage: DecodeCyberGate.py input.txt\r\n"
  34.         sys.exit(-1)
  35.     else:
  36.         DecodeCyberGate(sys.argv[1])
  37.         sys.exit(0)
  38.        
  39.  
  40.  
  41. if __name__ == "__main__":
  42.     main()
RAW Paste Data