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

Add password for OTA upload to LittleFS #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

LeisureLadi
Copy link

The dialogbox requests a password, even it may not be required. If you know, that OTA is not protected by password, leave the box empty and continue. The upload script is then called as before.

If a password is entered, the script will be executed with the -a option and the password.

Password capability added to plug-in.
If none required simply leave it empty. Use this plug-in only, if you had enough of flashing stupid temporary sketches without password, just to upload the file system and then flash again the final sketch. The dialog box will show up every time, even there is no password required (sorry, can't be avoided without modifying too much).
If a password is required to upload LittleFS via OTA, it can be entered now. Downside is, that the dialog box shows up every time. Simply leave it empty, if no password is required. In case you don't like this "extra" effort, don't use this plug-in.
For ESP8266 OTA upload of LittleFS
@877dev 877dev mentioned this pull request Jul 26, 2021
@@ -320,7 +321,17 @@ private void createAndUpload(){
if(isNetwork){
System.out.println("[LittleFS] IP : "+serialPort);
System.out.println();
sysExec(new String[]{pythonCmd, espota.getAbsolutePath(), "-i", serialPort, "-s", "-f", imagePath});

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think you could actually see if an AUTH is needed before presenting the box? I understand that you're using it, but since ArduinoOTA is so insecure anyway I have a feeling that most people will not be using a password at all.

It's possible to probe the board using UDP comms (connect to ESP8266, send SPIFFS command, check for AUTH response, see espota.py), or even just call espota.py once, and if it fails then prompt for a PWD and try again.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice and simple, BTW! Just trying to make the default case the easiest/simplest for end users.

@earlephilhower earlephilhower self-requested a review July 29, 2021 15:38
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

Successfully merging this pull request may close these issues.

2 participants