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

Function _ShellExecute

qiling/os/windows/dlls/shell32.py:63–82  ·  view source on GitHub ↗
(ql: Qiling, shellex_obj, *, wide: bool)

Source from the content-addressed store, hash-verified

61 return _SHGetFileInfo(ql, address, params)
62
63def _ShellExecute(ql: Qiling, shellex_obj, *, wide: bool):
64 read_str = ql.os.utils.read_wstring if wide else ql.os.utils.read_cstring
65
66 def __read_str(ptr: int):
67 return read_str(ptr) if ptr else ''
68
69 ql.log.debug(f'Target executed a shell command!')
70 ql.log.debug(f' | Operation : "{__read_str(shellex_obj.lpVerb)}"')
71 ql.log.debug(f' | File : "{__read_str(shellex_obj.lpFile)}"')
72 ql.log.debug(f' | Parameters : "{__read_str(shellex_obj.lpParameters)}"')
73 ql.log.debug(f' | Directory : "{__read_str(shellex_obj.lpDirectory)}"')
74
75 if shellex_obj.nShow == SW_HIDE:
76 ql.log.debug(' | With an hidden window')
77
78 process = QlWindowsThread(ql, status=THREAD_STATUS.READY)
79 handle = Handle(obj=process)
80 ql.os.handle_manager.append(handle)
81
82 return handle
83
84# BOOL ShellExecuteExW(
85# SHELLEXECUTEINFOA *pExecInfo

Callers 2

hook_ShellExecuteExWFunction · 0.85
hook_ShellExecuteWFunction · 0.85

Calls 4

QlWindowsThreadClass · 0.90
HandleClass · 0.90
__read_strFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected