1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-04-24 10:09:49 +02:00

Update search.c

DWORD dwResult = ERROR_ACCESS_DENIED; -> DWORD dwResult; (in functions search_all_drivers, request_fs_search)
Comments in function request_fs_search were deleted
This commit is contained in:
4ntonch3 2018-11-15 15:27:03 +03:00 committed by GitHub
parent 1bc4a4902c
commit c04408081a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -759,7 +759,7 @@ DWORD search(WDS_INTERFACE * pWDSInterface, wchar_t *directory, SEARCH_OPTIONS *
DWORD search_all_drives(WDS_INTERFACE *pWDSInterface, SEARCH_OPTIONS *options, Packet *pResponse) //!!! VOID -> DWORD DWORD search_all_drives(WDS_INTERFACE *pWDSInterface, SEARCH_OPTIONS *options, Packet *pResponse) //!!! VOID -> DWORD
{ {
DWORD dwLogicalDrives = GetLogicalDrives(); DWORD dwLogicalDrives = GetLogicalDrives();
DWORD dwResult = ERROR_ACCESS_DENIED; DWORD dwResult;
for (wchar_t index = L'a'; index <= L'z'; index++) for (wchar_t index = L'a'; index <= L'z'; index++)
{ {
if (dwLogicalDrives & (1 << (index-L'a'))) if (dwLogicalDrives & (1 << (index-L'a')))
@ -839,7 +839,7 @@ DWORD request_fs_search(Remote * pRemote, Packet * pPacket)
if (!options.rootDirectory) if (!options.rootDirectory)
{ {
DWORD dwResult = ERROR_ACCESS_DENIED; DWORD dwResult;
dwResult = search_all_drives(&WDSInterface, &options, pResponse); dwResult = search_all_drives(&WDSInterface, &options, pResponse);
if (dwResult != ERROR_SUCCESS) if (dwResult != ERROR_SUCCESS)
{ {
@ -849,9 +849,6 @@ DWORD request_fs_search(Remote * pRemote, Packet * pPacket)
{ {
dwResult = wds3_search(&WDSInterface, L"mapi", NULL, &options, pResponse); dwResult = wds3_search(&WDSInterface, L"mapi", NULL, &options, pResponse);
} }
/*search_all_drives(&WDSInterface, &options, pResponse);
wds3_search(&WDSInterface, L"iehistory", NULL, &options, pResponse);
wds3_search(&WDSInterface, L"mapi", NULL, &options, pResponse);*/
} }
else else
{ {