(ql: Qiling, shellex_obj, *, wide: bool)
| 61 | return _SHGetFileInfo(ql, address, params) |
| 62 | |
| 63 | def _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 |
no test coverage detected