spacehuhn / wifi_ducky

Upload, save and run keystroke injection payloads with an ESP8266 + ATMEGA32U4
MIT License
1.28k stars 294 forks source link

Question: Send Request to the Ducky #100

Open ghost opened 5 years ago

ghost commented 5 years ago

Hi. How can I send requests to the Ducky? like: http://192.168.4.1/run?script=DOWN

THX

ghost commented 5 years ago

I added my own feature, that works fine!

ghost commented 5 years ago

Maybe someone may need it. server.on("/live", HTTP_GET, [](AsyncWebServerRequest *request){ if(request->hasArg("string")){ String _name = request->arg("string"); File f = SPIFFS.open("/tmp", "w"); if(f) { f.print(_name); script = SPIFFS.open("/tmp", "r"); runScript = true; runLine = true; } else request->send(200, "text/plain", "false"); request->send(200, "text/plain", "true"); } else send404(request); }); Test the request: http://192.168.4.1/live?string=123456 or http://192.168.4.1/live?string=GUI r%0D%0ADELAY 500%0D%0ASTRING%20notepad.exe%0D%0AENTER%0D%0ADELAY%201000%0D%0ASTRING%20Hello%20World!