MCPcopy Create free account
hub / github.com/qilingframework/qiling / restore

Method restore

qiling/loader/pe.py:59–67  ·  view source on GitHub ↗
(self, path: str)

Source from the content-addressed store, hash-verified

57 return f'{path}.cache2'
58
59 def restore(self, path: str) -> Optional[QlPeCacheEntry]:
60 fcache = QlPeCache.cache_filename(path)
61
62 # check whether cache file exists and it is not older than the cached file itself
63 if os.path.exists(fcache) and os.stat(fcache).st_mtime > os.stat(path).st_mtime:
64 with open(fcache, "rb") as fcache_file:
65 return QlPeCacheEntry(*pickle.load(fcache_file))
66
67 return None
68
69 def save(self, path: str, entry: QlPeCacheEntry) -> None:
70 fcache = QlPeCache.cache_filename(path)

Callers 2

load_dllMethod · 0.45
call_dll_entrypointMethod · 0.45

Calls 4

QlPeCacheEntryClass · 0.85
cache_filenameMethod · 0.80
existsMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected