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

Function _DeleteFile

qiling/os/windows/dlls/kernel32/fileapi.py:914–928  ·  view source on GitHub ↗
(ql: Qiling, address: int, params)

Source from the content-addressed store, hash-verified

912 pass
913
914def _DeleteFile(ql: Qiling, address: int, params):
915 lpFileName = params["lpFileName"]
916
917 dst = ql.os.path.virtual_to_host_path(lpFileName)
918
919 if not ql.os.path.is_safe_host_path(dst):
920 ql.os.last_error = ERROR_GEN_FAILURE
921 return 0
922
923 try:
924 os.remove(dst)
925 except OSError:
926 return 0
927
928 return 1
929
930# BOOL DeleteFileA(
931# LPCSTR lpFileName

Callers 2

hook_DeleteFileAFunction · 0.85
hook_DeleteFileWFunction · 0.85

Calls 3

virtual_to_host_pathMethod · 0.80
is_safe_host_pathMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected