(source)
Extracts and decode payload (original file) from `source`
Extracts and decode payload (original file) from `source`
Extracts and decode payload ( original file ) from source
def _filter(source):
    """Extracts and decode payload (original file) from `source`"""
    try:
        varname = re.search(r'eval\(\w+\(\w+\((\w+)\)\)\);', source).group(1)
        reverse = re.search(r"var +%s *\= *'(.*)';" % varname, source).group(1)
    except AttributeError:
        raise UnpackingError('Malformed MyObfuscate data.')
    try:
        return base64.b64decode(reverse[::-1].encode('utf8')).decode('utf8')
    except TypeError:
        raise UnpackingError('MyObfuscate payload is not base64-encoded.')
def _filter ( source ) : try : varname = re . search ( r'eval\(\w+\(\w+\((\w+)\)\)\);' , source ) . group ( 1 ) reverse = re . search ( r"var +%s *\= *'(.*)';" % varname , source ) . group ( 1 ) except AttributeError : raise UnpackingError ( 'Malformed MyObfuscate data.' ) try : return base64 . b64decode ( reverse [ : : - 1 ] . encode ( 'utf8' ) ) . decode ( 'utf8' ) except TypeError : raise UnpackingError ( 'MyObfuscate payload is not base64-encoded.' )