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

Method _decode_join_chr_map

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

Source from the content-addressed store, hash-verified

351 return p3.sub(d3, source)
352
353 def _decode_join_chr_map(self, source: str) -> str:
354 pattern = re.compile(
355 r'["\']["\']\.join\s*\(\s*map\s*\(\s*chr\s*,\s*range\s*\(\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+))?\s*\)\s*\)\s*\)'
356 )
357 def d(m):
358 try:
359 start, stop = int(m.group(1)), int(m.group(2))
360 step = int(m.group(3)) if m.group(3) else 1
361 r = ''.join(chr(n) for n in range(start, stop, step))
362 return repr(r) if r.isprintable() else m.group(0)
363 except Exception:
364 return m.group(0)
365 return pattern.sub(d, source)
366
367 def _decode_xor_zip(self, source: str) -> str:
368 """

Callers 1

_single_passMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected