MCPcopy Create free account
hub / github.com/Fadi002/de4py / decode_all

Method decode_all

de4py/engines/onyx/string_decoder.py:29–40  ·  view source on GitHub ↗
(self, source: str)

Source from the content-addressed store, hash-verified

27 MAX_PASSES = 10
28
29 def decode_all(self, source: str) -> str:
30 try:
31 for _ in range(self.MAX_PASSES):
32 decoded = self._single_pass(source)
33 if decoded == source:
34 break
35 source = decoded
36 except RecursionError:
37 pass # return whatever we have so far
38 except Exception:
39 pass # return whatever we have so far
40 return source
41
42 def _single_pass(self, source: str) -> str:
43 # 0a. AST constant folding: handles b64/b85 chains, chr(ord(i)-N),

Callers 8

test_base64_decodeFunction · 0.80
test_eval_unwrapFunction · 0.80
test_chr_chainFunction · 0.80
test_hex_escapeFunction · 0.80
test_xor_bytesFunction · 0.80
test_nested_evalFunction · 0.80
test_rot13Function · 0.80

Calls 1

_single_passMethod · 0.95

Tested by 8

test_base64_decodeFunction · 0.64
test_eval_unwrapFunction · 0.64
test_chr_chainFunction · 0.64
test_hex_escapeFunction · 0.64
test_xor_bytesFunction · 0.64
test_nested_evalFunction · 0.64
test_rot13Function · 0.64