(source)
return _replacestrings(source)
Unpacks P.A.C.K.E.R. packed js code.
Unpacks P.A.C.K.E.R. packed js code.
Unpacks P . A . C . K . E . R . packed js code .
def unpack(source):
    """Unpacks P.A.C.K.E.R. packed js code."""
    payload, symtab, radix, count = _filterargs(source)

    if count != len(symtab):
        raise UnpackingError('Malformed p.a.c.k.e.r. symtab.')

    try:
        unbase = Unbaser(radix)
    except TypeError:
        raise UnpackingError('Unknown p.a.c.k.e.r. encoding.')

    def lookup(match):
        """Look up symbols in the synthetic symtab."""
        word  = match.group(0)
        return symtab[unbase(word)] or word

    source = re.sub(r'\b\w+\b', lookup, payload)
    return _replacestrings(source)
def unpack ( source ) : payload , symtab , radix , count = _filterargs ( source ) if count != len ( symtab ) : raise UnpackingError ( 'Malformed p.a.c.k.e.r. symtab.' ) try : unbase = Unbaser ( radix ) except TypeError : raise UnpackingError ( 'Unknown p.a.c.k.e.r. encoding.' ) def lookup ( match ) : """Look up symbols in the synthetic symtab.""" word = match . group ( 0 ) return symtab [ unbase ( word ) ] or word source = re . sub ( r'\b\w+\b' , lookup , payload ) return _replacestrings ( source )