Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Send Request to the Ducky #100

Open
ghost opened this issue Aug 14, 2019 · 2 comments
Open

Question: Send Request to the Ducky #100

ghost opened this issue Aug 14, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 14, 2019

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

THX

@ghost
Copy link
Author

ghost commented Aug 19, 2019

I added my own feature, that works fine!

@ghost ghost closed this as completed Aug 19, 2019
@ghost
Copy link
Author

ghost commented Aug 23, 2019

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!

@ghost ghost reopened this Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants