[GH-ISSUE #1610] Web-Console for v2 #903

Open
opened 2026-02-28 00:05:22 +03:00 by kerem · 12 comments
Owner

Originally created by @WaGi-Coding on GitHub (Dec 8, 2022).
Original GitHub issue: https://github.com/SpacehuhnTech/esp8266_deauther/issues/1610

Do similar feature requests issues already exist (open and closed)?
Didn't found any

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I like the Webinterface, but I like using CLI even more. I am not sure if it's possible already, but i'd like if i could use the AP for CLI.
Basically, serving a Website offering a output-textbox, command-textbox, send button and some configurable macro buttons. Also i am not sure if i am the only one who would use it.

Describe alternatives you've considered
Instead of adding it to the existing Web-Interface, offer a branch where instead of the current Web interface, it uses the Web-Console described above

Additional context
Here a screenshot of my current Serial Monitor to visualize the features a bit
grafik

Originally created by @WaGi-Coding on GitHub (Dec 8, 2022). Original GitHub issue: https://github.com/SpacehuhnTech/esp8266_deauther/issues/1610 **Do similar feature requests issues already exist (open and closed)?** Didn't found any **Is your feature request related to a problem? Please describe.** No **Describe the solution you'd like** I like the Webinterface, but I like using CLI even more. I am not sure if it's possible already, but i'd like if i could use the AP for CLI. Basically, serving a Website offering a output-textbox, command-textbox, send button and some configurable macro buttons. Also i am not sure if i am the only one who would use it. **Describe alternatives you've considered** Instead of adding it to the existing Web-Interface, offer a branch where instead of the current Web interface, it uses the Web-Console described above **Additional context** Here a screenshot of my current Serial Monitor to visualize the features a bit ![grafik](https://user-images.githubusercontent.com/38970388/206467573-72d83a96-c265-4a1d-a6d6-39cc7c55ade4.png)
Author
Owner

@welcome[bot] commented on GitHub (Dec 8, 2022):

Congrats on opening your first issue on this repository! 🎉
This is a automated message to help you avoid common pitfalls when asking for help online.
👉 Be sure to:
* 🇬🇧 Communicate in English so everybody can understand you
* 📖 Have a look at the Wiki and README for information
* 🔍 Search for similar issues (open and closed)
* ✍️ Provide enough information to understand, recreate and help out with your problem
* ℹ️ Let us know if you find a solution and please share it with us
* 📕 Close the issue when your problem has been solved

<!-- gh-comment-id:1342797462 --> @welcome[bot] commented on GitHub (Dec 8, 2022): Congrats on opening your first issue on this repository! 🎉<br> This is a automated message to help you avoid common pitfalls when asking for help online.<br> 👉 Be sure to:<br> * 🇬🇧 Communicate in English so everybody can understand you<br> * 📖 Have a look at the [Wiki](https://github.com/spacehuhntech/esp8266_deauther/wiki) and [README](https://github.com/SpacehuhnTech/esp8266_deauther/blob/v2/README.md) for information<br> * 🔍 Search for similar [issues (open and closed)](https://github.com/SpacehuhnTech/esp8266_deauther/issues?q=is%3Aissue+)<br> * ✍️ Provide enough information to understand, recreate and help out with your problem<br> * ℹ️ Let us know if you find a solution and please share it with us<br> * 📕 Close the issue when your problem has been solved
Author
Owner

@WaGi-Coding commented on GitHub (Dec 8, 2022):

Or maybe we can connect to a CLI port with any Terminal supporting WiFi? (Serial-WiFi-Bridge)

<!-- gh-comment-id:1342816115 --> @WaGi-Coding commented on GitHub (Dec 8, 2022): Or maybe we can connect to a CLI port with any Terminal supporting WiFi? (Serial-WiFi-Bridge)
Author
Owner

@NurTasin commented on GitHub (Dec 8, 2022):

I found these pieces of code in wifi.cpp

server.on("/run", HTTP_GET, []() {
    server.send(200, str(W_TXT), str(W_OK).c_str());
    String input = server.arg("cmd");
    cli.exec(input);
 });

this takes CLI input as cmd argument on /run path. Something like /run?cmd=help.
I don't know I could be totally wrong. But it doesn't send the CLI output back. It only sends the word OK as a response.

<!-- gh-comment-id:1342996611 --> @NurTasin commented on GitHub (Dec 8, 2022): I found these pieces of code in `wifi.cpp` ```c++ server.on("/run", HTTP_GET, []() { server.send(200, str(W_TXT), str(W_OK).c_str()); String input = server.arg("cmd"); cli.exec(input); }); ``` this takes CLI input as `cmd` argument on `/run` path. Something like `/run?cmd=help`. I don't know I could be totally wrong. But it doesn't send the CLI output back. It only sends the word `OK` as a response.
Author
Owner

@WaGi-Coding commented on GitHub (Dec 8, 2022):

I found these pieces of code in wifi.cpp

server.on("/run", HTTP_GET, []() {
    server.send(200, str(W_TXT), str(W_OK).c_str());
    String input = server.arg("cmd");
    cli.exec(input);
 });

this takes CLI input as cmd argument on /run path. Something like /run?cmd=help. I don't know I could be totally wrong. But it doesn't send the CLI output back. It only sends the word OK as a response.

oh cool, many thanks for letting me know, that way i could at least add some simple form i guess. I think a Bridge (idk if you can actually call it like that) would be great, but i guess thats a bit more work than building on the webserver part you just posted.

I'll test if it works by editing a line in the autostart file or so.

<!-- gh-comment-id:1343003772 --> @WaGi-Coding commented on GitHub (Dec 8, 2022): > I found these pieces of code in `wifi.cpp` > > ```c++ > server.on("/run", HTTP_GET, []() { > server.send(200, str(W_TXT), str(W_OK).c_str()); > String input = server.arg("cmd"); > cli.exec(input); > }); > ``` > > this takes CLI input as `cmd` argument on `/run` path. Something like `/run?cmd=help`. I don't know I could be totally wrong. But it doesn't send the CLI output back. It only sends the word `OK` as a response. oh cool, many thanks for letting me know, that way i could at least add some simple form i guess. I think a Bridge (idk if you can actually call it like that) would be great, but i guess thats a bit more work than building on the webserver part you just posted. I'll test if it works by editing a line in the autostart file or so.
Author
Owner

@WaGi-Coding commented on GitHub (Dec 8, 2022):

I'll test if it works by editing a line in the autostart file or so.

Okay, it works. You can see the output over serial monitor tho. If you want to send commands with spaces, use %20 instead of space, for example 192.168.4.1/run?cmd=replace%20autostart.txt%200%20help would replace the first line (0) of the autostart.txt (by default sysinfo) with the "help" command

But for sure you do not get the output as response unfortunately, which then is not very helpful in that matter :/ Anyway, very good to know

<!-- gh-comment-id:1343019324 --> @WaGi-Coding commented on GitHub (Dec 8, 2022): > I'll test if it works by editing a line in the autostart file or so. Okay, it works. You can see the output over serial monitor tho. If you want to send commands with spaces, use %20 instead of space, for example `192.168.4.1/run?cmd=replace%20autostart.txt%200%20help` would replace the first line (0) of the autostart.txt (by default sysinfo) with the "help" command But for sure you do not get the output as response unfortunately, which then is not very helpful in that matter :/ Anyway, very good to know
Author
Owner

@NurTasin commented on GitHub (Dec 8, 2022):

I'll test if it works by editing a line in the autostart file or so.

Okay, it works. You can see the output over serial monitor tho. If you want to send commands with spaces, use %20 instead of space, for example 192.168.4.1/run?cmd=replace%20autostart.txt%200%20help would replace the first line (0) of the autostart.txt (by default sysinfo) with the "help" command

But for sure you do not get the output as response unfortunately, which then is not very helpful in that matter :/ Anyway, very good to know

Yeah, argument values must be URL escaped. Thats why we have to use %20 instead of space.
I think I can make some progress on sending the cli output as response. I am currently reading the cli.cpp. There I've found the void CLI::runCommand(String input) function. I was wondering if somehow we override the prntln and prnt function so that they print on Serial monitor as well as sending the texts as a response to the web console, we will be able to achieve our goal. I'll try to make that happen :-)
And maybe it will be another feature for the deauther v3 :-D
I'll be describing my progresses in this Issue if can make some.
(Sorry for my terrible English)

<!-- gh-comment-id:1343100383 --> @NurTasin commented on GitHub (Dec 8, 2022): > > I'll test if it works by editing a line in the autostart file or so. > > Okay, it works. You can see the output over serial monitor tho. If you want to send commands with spaces, use %20 instead of space, for example `192.168.4.1/run?cmd=replace%20autostart.txt%200%20help` would replace the first line (0) of the autostart.txt (by default sysinfo) with the "help" command > > But for sure you do not get the output as response unfortunately, which then is not very helpful in that matter :/ Anyway, very good to know Yeah, argument values must be URL escaped. Thats why we have to use %20 instead of space. I think I can make some progress on sending the cli output as response. I am currently reading the [`cli.cpp`](https://github.com/SpacehuhnTech/esp8266_deauther/blob/v2/esp8266_deauther/CLI.cpp). There I've found the `void CLI::runCommand(String input)` function. I was wondering if somehow we override the `prntln` and `prnt` function so that they print on Serial monitor as well as sending the texts as a response to the web console, we will be able to achieve our goal. I'll try to make that happen :-) And maybe it will be another feature for the deauther v3 :-D I'll be describing my progresses in this Issue if can make some. (Sorry for my terrible English)
Author
Owner

@WaGi-Coding commented on GitHub (Dec 8, 2022):

I'll test if it works by editing a line in the autostart file or so.

Okay, it works. You can see the output over serial monitor tho. If you want to send commands with spaces, use %20 instead of space, for example 192.168.4.1/run?cmd=replace%20autostart.txt%200%20help would replace the first line (0) of the autostart.txt (by default sysinfo) with the "help" command
But for sure you do not get the output as response unfortunately, which then is not very helpful in that matter :/ Anyway, very good to know

Yeah, argument values must be URL escaped. Thats why we have to use %20 instead of space. I think I can make some progress on sending the cli output as response. I am currently reading the cli.cpp. There I've found the void CLI::runCommand(String input) function. I was wondering if somehow we override the prntln and prnt function so that they print on Serial monitor as well as sending the texts as a response to the web console, we will be able to achieve our goal. I'll try to make that happen :-) And maybe it will be another feature for the deauther v3 :-D I'll be describing my progresses in this Issue if can make some. (Sorry for my terrible English)

Would be great if you manage something like that ^^ I am lacking the skills for this language and do not really know how i could even achieve this properly. Personally so far for just the deauther, i enjoy v2 more than v3, maybe i missed something with v3, but i was not able to set it up the way i had with v2. Anyway, would be great for any version. And no worries, my english isn't the best either as you might can see ._.

Greetings

<!-- gh-comment-id:1343112711 --> @WaGi-Coding commented on GitHub (Dec 8, 2022): > > > I'll test if it works by editing a line in the autostart file or so. > > > > > > Okay, it works. You can see the output over serial monitor tho. If you want to send commands with spaces, use %20 instead of space, for example `192.168.4.1/run?cmd=replace%20autostart.txt%200%20help` would replace the first line (0) of the autostart.txt (by default sysinfo) with the "help" command > > But for sure you do not get the output as response unfortunately, which then is not very helpful in that matter :/ Anyway, very good to know > > Yeah, argument values must be URL escaped. Thats why we have to use %20 instead of space. I think I can make some progress on sending the cli output as response. I am currently reading the [`cli.cpp`](https://github.com/SpacehuhnTech/esp8266_deauther/blob/v2/esp8266_deauther/CLI.cpp). There I've found the `void CLI::runCommand(String input)` function. I was wondering if somehow we override the `prntln` and `prnt` function so that they print on Serial monitor as well as sending the texts as a response to the web console, we will be able to achieve our goal. I'll try to make that happen :-) And maybe it will be another feature for the deauther v3 :-D I'll be describing my progresses in this Issue if can make some. (Sorry for my terrible English) Would be great if you manage something like that ^^ I am lacking the skills for this language and do not really know how i could even achieve this properly. Personally so far for just the deauther, i enjoy v2 more than v3, maybe i missed something with v3, but i was not able to set it up the way i had with v2. Anyway, would be great for any version. And no worries, my english isn't the best either as you might can see ._. Greetings
Author
Owner

@ra1n08 commented on GitHub (Dec 10, 2022):

oh, im finding such thing, if this possible, it will helpful for some apps on android and ios device
like click deauth button on app GUI (not web gui) and it send request https://<deauther_ip>/run?=deauth <wifi_name>

<!-- gh-comment-id:1345092747 --> @ra1n08 commented on GitHub (Dec 10, 2022): oh, im finding such thing, if this possible, it will helpful for some apps on android and ios device like click deauth button on app GUI (not web gui) and it send request https://<deauther_ip>/run?=deauth <wifi_name> <timeout>
Author
Owner

@ra1n08 commented on GitHub (Dec 10, 2022):

but i think need a esp8266 have >4mb flash for web_cli, web_gui and some json config file
that big

<!-- gh-comment-id:1345096817 --> @ra1n08 commented on GitHub (Dec 10, 2022): but i think need a esp8266 have >4mb flash for web_cli, web_gui and some json config file that big
Author
Owner

@NurTasin commented on GitHub (Dec 10, 2022):

Hey buddies, I have made some progresses towards making the web console thing real.
I have added a /console endpoint to the server, that sends the raw console output.
Here I ran the code through the /run endpoint

run

And after running that. I made a HTTP_GET request at /console endpoint. And the output looks like this

consoleOutput

Now I just have to make a web page for the WebConsole using some HTML,CSS,JS. This might take some time.
But you guys can take a look at my fork of this repo and try it your self if you want.

<!-- gh-comment-id:1345165352 --> @NurTasin commented on GitHub (Dec 10, 2022): Hey buddies, I have made some progresses towards making the web console thing real. I have added a `/console` endpoint to the server, that sends the raw console output. Here I ran the code through the `/run` endpoint ![run](https://user-images.githubusercontent.com/62534505/206837620-8218e0e5-2295-4746-84c7-b9df9e13484e.PNG) And after running that. I made a HTTP_GET request at `/console` endpoint. And the output looks like this ![consoleOutput](https://user-images.githubusercontent.com/62534505/206837658-fbac668b-372f-4ee9-a3b3-f9644c3bd36c.PNG) Now I just have to make a web page for the WebConsole using some HTML,CSS,JS. This might take some time. But you guys can take a look at my [fork](https://github.com/NurTasin/esp8266_deauther) of this repo and try it your self if you want.
Author
Owner

@NurTasin commented on GitHub (Dec 12, 2022):

Added /webconsole.html endpoint.

Hey, I have added the necessary HTML,JS and CSS files. And now you can control the deauther through a web console.
For now it has some flaws. Like:

  • It updates the console once in every 5 seconds. So it's not actually realtime.
  • It only sends the command from the console if the Enter key is pressed. This works perfectly with PCs but doesn't work with Mobile Phones.

I'll fix these problems in next release. You can get the releases here.
Make sure that you have starred my fork of this project to stay updated.

<!-- gh-comment-id:1346036638 --> @NurTasin commented on GitHub (Dec 12, 2022): # Added `/webconsole.html` endpoint. Hey, I have added the necessary HTML,JS and CSS files. And now you can control the deauther through a web console. For now it has some flaws. Like: - It updates the console once in every 5 seconds. So it's not actually realtime. - It only sends the command from the console if the Enter key is pressed. This works perfectly with PCs but doesn't work with Mobile Phones. I'll fix these problems in next release. You can get the releases [here](https://github.com/NurTasin/esp8266_deauther/releases/tag/v2.7). Make sure that you have starred [my fork](https://github.com/NurTasin/esp8266_deauther) of this project to stay updated.
Author
Owner

@ra1n08 commented on GitHub (Jan 15, 2023):

nice you're maked api for deauther, so now i can access to deauther via python code

<!-- gh-comment-id:1383067009 --> @ra1n08 commented on GitHub (Jan 15, 2023): nice you're maked api for deauther, so now i can access to deauther via python code
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/esp8266_deauther#903
No description provided.