<s> from random import randint <EOL> from itertools import product <EOL> from sys import setrecursionlimit <EOL> from re import findall <EOL> from sys import exit <EOL> import re <EOL> setrecursionlimit ( <NUM_LIT> ) <EOL> def xorme ( shellcode ) : <EOL> cache = shellcode <EOL> mylist = [ "<STR_LIT>" . join ( x ) for x in list ( product ( "<STR_LIT>" , repeat = <NUM_LIT:2> ) ) ] <EOL> insert = mylist [ randint ( <NUM_LIT:0> , len ( mylist ) - <NUM_LIT:1> ) ] <EOL> xorfirst = [ <EOL> r"<STR_LIT>" , <EOL> r"<STR_LIT>" , <EOL> r"<STR_LIT>" , <EOL> r"<STR_LIT>" , <EOL> ] <EOL> header = xorfirst [ randint ( <NUM_LIT:0> , len ( xorfirst ) - <NUM_LIT:1> ) ] <EOL> header += r"<STR_LIT>" <EOL> header += xorfirst [ randint ( <NUM_LIT:0> , len ( xorfirst ) - <NUM_LIT:1> ) ] <EOL> header += r"<STR_LIT>" <EOL> header += xorfirst [ randint ( <NUM_LIT:0> , len ( xorfirst ) - <NUM_LIT:1> ) ] <EOL> header += r"<STR_LIT>" <EOL> header += r"<STR_LIT>" + insert <EOL> header += r"<STR_LIT>" <EOL> header += xorfirst [ randint ( <NUM_LIT:0> , len ( xorfirst ) - <NUM_LIT:1> ) ] <EOL> header += r"<STR_LIT>" <EOL> header += xorfirst [ randint ( <NUM_LIT:0> , len ( xorfirst ) - <NUM_LIT:1> ) ] <EOL> header += r"<STR_LIT>" <EOL> encode = "<STR_LIT>" <EOL> for x in bytearray ( cache . decode ( "<STR_LIT>" ) ) : <EOL> y = x ^ int ( "<STR_LIT>" + insert , <NUM_LIT:16> ) <EOL> test = r'<STR_LIT>' % y <EOL> encode += test <EOL> header += encode . upper ( ) <EOL> header += r"<STR_LIT>" + insert <EOL> if r"<STR_LIT:\x00>" in header . lower ( ) : <EOL> xorme ( shellcode ) <EOL> return header . lower ( ) . replace ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> def start ( shellcode ) : <EOL> try : <EOL> control = True <EOL> while control == True : <EOL> qe = re . findall ( "<STR_LIT>" , xorme ( shellcode ) ) <EOL> if "<STR_LIT>" in qe : <EOL> qe = re . findall ( "<STR_LIT>" , xorme ( shellcode ) ) <EOL> control = True <EOL> else : <EOL> control = False <EOL> return "<STR_LIT>" . join ( qe ) <EOL> except : <EOL> return "<STR_LIT>" <EOL> def prestart ( data , roll = None ) : <EOL> cache = True <EOL> if roll == None or roll == <NUM_LIT:1> : <EOL> data = start ( data ) <EOL> elif roll > <NUM_LIT> : <EOL> return "<STR_LIT>" <EOL> else : <EOL> cache = False <EOL> for x in range ( int ( roll ) ) : <EOL> if data == "<STR_LIT>" : <EOL> cache = True <EOL> break <EOL> data = start ( data ) <EOL> if cache == False : <EOL> qe = re . findall ( "<STR_LIT>" , data ) <EOL> return "<STR_LIT>" + "<STR_LIT>" . join ( qe ) . lower ( ) <EOL> else : <EOL> return "<STR_LIT>" </s>
