MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / is_valid_dos_filename

Function is_valid_dos_filename

pythonmemorymodule/pefile.py:2269–2274  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

2267
2268
2269def is_valid_dos_filename(s):
2270 if s is None or not isinstance(s, (str, bytes, bytearray)):
2271 return False
2272 # Allow path separators as import names can contain directories.
2273 allowed = allowed_filename + b"\\/"
2274 return all(c in allowed for c in set(s))
2275
2276
2277# Check if an imported name uses the valid accepted characters expected in

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected