(code)
return code
Unpacks JavascriptObfuscator.com packed code.
Unpacks JavascriptObfuscator.com packed code.
Unpacks JavascriptObfuscator . com packed code .
def unpack(code):
    """Unpacks JavascriptObfuscator.com packed code."""
    if detect(code):
        matches = re.search(r'var (_0x[a-f\d]+) ?\= ?\[(.*?)\];', code)
        if matches:
            variable = matches.group(1)
            dictionary = smartsplit(matches.group(2))
            code = code[len(matches.group(0)):]
            for key, value in enumerate(dictionary):
                code = code.replace(r'%s[%s]' % (variable, key), value)
    return code
def unpack ( code ) : if detect ( code ) : matches = re . search ( r'var (_0x[a-f\d]+) ?\= ?\[(.*?)\];' , code ) if matches : variable = matches . group ( 1 ) dictionary = smartsplit ( matches . group ( 2 ) ) code = code [ len ( matches . group ( 0 ) ) : ] for key , value in enumerate ( dictionary ) : code = code . replace ( r'%s[%s]' % ( variable , key ) , value ) return code