AndrewRathbun/KAPE-EZToolsAncillaryUpdater

Non Fatal error when any of the three "EvtxECmd, RECmd, and SQLECmd" folders do not exist if there is a file to update.

Donovoi opened this issue · 1 comments

Hi Andrew,

Just noticed the following errors after trying to update:

Details
* Files to download: 1
* F:\Triage\KAPE\Modules\bin\ZimmermanTools\net6 does not exist. Creating...
VERBOSE: GET with 0-byte payload
VERBOSE: received 82580608-byte response of content type application/zip
* Downloaded EZViewer.zip (Size: 82,580,608) (net 6)

* Saving downloaded version information to F:\Triage\KAPE\Modules\bin\ZimmermanTools\!!!RemoteFileDetails.csv

[2022/04/20 05:20:44] | Copying EvtxECmd, RECmd, and SQLECmd and all associated ancillary files to F:\Triage\KAPE\Modules\bin
Copy-Item: F:\Triage\KAPE\KAPE-EZToolsAncillaryUpdater.ps1:374
Line |
 374 |          Copy-Item -Path $folder -Destination $kapeModulesBin -Recurse …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'F:\Triage\KAPE\Modules\bin\ZimmermanTools\net6\EvtxECmd' because it does not exist.

Copy-Item: F:\Triage\KAPE\KAPE-EZToolsAncillaryUpdater.ps1:374
Line |
 374 |          Copy-Item -Path $folder -Destination $kapeModulesBin -Recurse …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'F:\Triage\KAPE\Modules\bin\ZimmermanTools\net6\RECmd' because it does not exist.

Copy-Item: F:\Triage\KAPE\KAPE-EZToolsAncillaryUpdater.ps1:374
Line |
 374 |          Copy-Item -Path $folder -Destination $kapeModulesBin -Recurse …
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path 'F:\Triage\KAPE\Modules\bin\ZimmermanTools\net6\SQLECmd' because it does not exist.

[2022/04/20 05:20:44] | Copied EvtxECmd, RECmd, and SQLECmd and all associated ancillary files to F:\Triage\KAPE\Modules\bin successfully
[2022/04/20 05:20:44] | Copying remaining EZ Tools binaries to F:\Triage\KAPE\Modules\bin
I think we need an if statement to determine if we are expecting to update these folders, if not than skip. Let me know if you would like me to submit a pull request and I can fix it up.

Thank you

Please go ahead and do a PR!