Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random, string, os
- encryptedvariable = "program"
- encryptedstring = ""
- def EncryptData(data, encryptdata, encryptvar):
- global encryptedstring
- global encryptedvariable
- if encryptdata == "True":
- encryptedstring = "\\x" + "\\x".join("{0:x}".format(ord(data)) for data in data)
- else:
- print("Error encrypting data!")
- if encryptvar == "True":
- number = random.randint(1, 1000)
- length = random.randint(35, 50)
- def randomvar(length):
- letters = ['I','i','l']
- global encryptedvariable2
- encryptedvariable2 = ''.join(random.choice(letters) for i in range(length))
- randomvar(length)
- encryptedvariable = encryptedvariable2 + str(number)
- filed = "compileddat.txt"
- if os.path.exists(filed):
- os.remove(filed)
- file = open("compileddat.txt","w+")
- file.write(encryptedvariable +" =("+"'"+ encryptedstring +"'"+ ")\nexec(" + encryptedvariable + ")")
- else:
- file = open("compileddat.txt","w+")
- file.write(encryptedvariable +" =("+"'"+ encryptedstring +"'"+ ")\nexec(" + encryptedvariable + ")")
- pythoncode = open("debugsource.txt","r")
- encryptvarcode = open("encryptvar.txt","r")
- encryptdatacode = open("encryptdata.txt","r")
- indata = pythoncode.read()
- invarcode = encryptvarcode.read()
- indatacode = encryptdatacode.read()
- userinput = (input(str(indata)))
- edata = (input(str(indatacode)))
- evar = (input(str(invarcode)))
- EncryptData(userinput, "True", "True")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement