dbisu / pico-ducky

Create a USB Rubber Ducky like device using a Raspberry PI Pico
GNU General Public License v2.0
2.3k stars 421 forks source link

Question: After Payload run a Batch file #256

Open Alznex opened 4 months ago

Alznex commented 4 months ago

Is there a way to start running a Batch datei, because i have many script in them and dont want to work myself in this payload.dd. I dont wannt it to be run over the payload, but rather in the python code, i tried it with os or subprocess, but i dont know if i did somethink wrong or oversaw somethink. pls Help.

dbisu commented 4 months ago

Not sure I'm following the question. the python code runs on the pi pico, not on the host computer, so os or subprocess calls will not call to the host computer. You can run batch files, similar to how you would run notepad.exe in the example payload.

Alznex commented 4 months ago

Thanks for replaying so fast, sorry that i didnt make clear exactly what i am trying. So my batch file is on the raspberry and is supposed to execute befor or after the payload. Sadly i dont kno the mistake i did but trying to run it trough os or subprocess throw out some kind of error i guess because than the payload also did not start, i know that is has not somethink todo with the lib it self because if i let the batch file be executet after the payload, the payload starts and it looks fine exept that the batch is not executet. EDIT: Know i understand what you mean, is there a way to still make it work or does this only works if the Batch fileis on the target PC?

dbisu commented 4 months ago

if you know where the pi pico will be mounted on the target pc, then yes, you can just run the batch file like any other command on the target pc.