import sys
import random
import logging
yellow = '\033[93m'
lgreen = '\033[92m'
clear = '\033[0m'
bold = '\033[01m'
cyan = '\033[96m'
red = "\033[91m"
logging.basicConfig(level=logging.INFO)
__banner__ = yellow+"""
\t
+-------------------------------------------------------------------+
โ โ
โ โ โ โ โโโ โโโ โโโ โโโ โโโ โโโ โโโ โ โ โโโ โโโ โโโ โโโ โโโ โ
โ โโโโโ โ โ โโโ โ โโโ โโโ โโโ โโ โโโ โโโ โโโ โโโ โ โโโ โ
โ โ
โ ๐๐๐๐ต๐ผ๐ฟ : ๐๐ต๐ถ๐๐ฒ ๐ฒ๐ฎ๐ด๐น๐ฒ ๐ง๐ฒ๐น๐ฒ๐ด๐ฟ๐ฎ๐บ : ๐ต๐๐๐ฝ๐://๐.๐บ๐ฒ/๐๐ฎ_๐๐๐๐ถ_๐๐ฎ๐ง๐ฎ๐๐ฒ
โ โ
+-------------------------------------------------------------------+
\n"""+clear
def main(files, string):
s = open(files).read()
z = []
for i in s:
z.append(ord(i))
pea = []
for i in z:
pea.append(string.replace("'", "").replace('"', '')*i)
file = """
# coding=utf-8
# obfuscated with white obfuscate : https://github.com/WH1T3-E4GL3/white-obfuscate
d={};exec("".join([chr(len(i)) for i in d]))
""".format(pea)
open(files.replace(".py", "encypt.py"), "w").write(file)
logging.info(" saved as "+files.replace(".py", "encrypt.py"))
try:
print(__banner__)
logging.info(" obfuscating "+sys.argv[1]+"....")
main(sys.argv[1], sys.argv[2])
except:
print("""+-------------------------------------------------------------------+
""")
print(red+"""[ERROR!]
"""+clear, end=' ')
print("""
Usage : python white-obsf.py <filename> 'string'
Example : python white-obfs.py pythoncode.py '#'
This will modify your full python script with '+' symbol.
""")
print("""+-------------------------------------------------------------------+""
lol