Hacking My 5.05 Exploit / Playground a variant/fork of KiiWii's. Big thanks to him!

Sparkss

Well-Known Member
Member
Joined
Jul 14, 2014
Messages
144
Trophies
0
Age
56
XP
432
Country
United States
send me the FTP codes if you like. It will now have the "admin" access that stooged did. So you can upload files, delete, change credentials like you said, all from the little admin panel and using ANY browser from any device like pc, phone , that is connected to the esp. BUT ftp i don't have yet, so yeah that would be awesome

I am going to review the new ino from Stooged to see about the internal pages he creates (I suspect they are similar to the "built-in" Settings page that is available in the other Sketches). He may have already included the FTP code. Either way it is simple.

Add this to your include lines:

#include <ESP8266FtpServer.h>

Then further down create the object:

FtpServer ftpSrv;


Then in your begin statements, after you start (begin) SPIFFS, add this line:

ftpSrv.begin("ESPS4","password");

I used variables for my l/p so that I could update them from the Settings page, but most that I have seen just use hard coded values, like above.


There are a couple of requirements for using the FTP. Here is an excerpt from the GIT page for it:

This allows you to FTP into your esp8266 and access/modify the spiffs folder/data...it only allows one ftp connection at a time....very simple for now...
I've tested it with Filezilla, and the basics work (upload/download/rename/delete). There's no create/modify directory support(no directory support in SPIFFS yet).
You need to setup Filezilla(or other client) to only allow 1 connection..
To force FileZilla to use the primary connection for data transfers:
Go to File/Site Manager then select your site.
In Transfer Settings, check "Limit number of simultaneous connections" and set the maximum to 1
only supports Passive ftp mode....
It does NOT support any encryption, so you'll have to disable any form of encryption...


HTH
 

MasterZoilus

Well-Known Member
OP
Member
Joined
Sep 10, 2014
Messages
152
Trophies
0
Age
50
XP
662
Country
United States
@Sparkss ok cool thanks

yeah i fiddled with this before and couldn't get it to work. I will try this method out.

In the sketch (by stooged) there is no "included" ftp.h of any kind. As a matter of fact the letters "ftp" like that, don't exist anywhere in it!
searched with notepad++

So after trying it out i will get back to you.
 
  • Like
Reactions: KiiWii

Sparkss

Well-Known Member
Member
Joined
Jul 14, 2014
Messages
144
Trophies
0
Age
56
XP
432
Country
United States
@Sparkss ok cool thanks

yeah i fiddled with this before and couldn't get it to work. I will try this method out.

In the sketch (by stooged) there is no "included" ftp.h of any kind. As a matter of fact the letters "ftp" like that, don't exist anywhere in it!
searched with notepad++

So after trying it out i will get back to you.

Yea, I reviewed his code and it is quite a bit more complex than the original ino sketch (not a bad thing, just an observation). If you implement the FTP you may also want to eventually update his settings page to include the ftp user and password there for user updating later.

I also noticed that he did not use the offline cache either, which only needs 1 line modified to the top of the index.html then a manifest file (offline.manifest) with all of the htmls listed in it. Here is the change to make to the index.html

<!DOCTYPE html>
<html>
<head>

Becomes this:

<!DOCTYPE html>
<html manifest="./offline.manifest">
<head>

The offline manifest file uses a "CACHE MANIFEST" header then the list of files. Like this:

CACHE MANIFEST
/ApptoUsb.html
/bg.png
/index.html
..... (etc.)


Of course the offline cache will not work for the internally generated web pages, like admin, config, info, etc. as those are generated by the code running on the ESP itself and don't represent a physical html file to cache.

HTH!
 

MasterZoilus

Well-Known Member
OP
Member
Joined
Sep 10, 2014
Messages
152
Trophies
0
Age
50
XP
662
Country
United States
I am going to review the new ino from Stooged to see about the internal pages he creates (I suspect they are similar to the "built-in" Settings page that is available in the other Sketches). He may have already included the FTP code. Either way it is simple.

Add this to your include lines:

#include <ESP8266FtpServer.h>

Then further down create the object:

FtpServer ftpSrv;


Then in your begin statements, after you start (begin) SPIFFS, add this line:

ftpSrv.begin("ESPS4","password");

I used variables for my l/p so that I could update them from the Settings page, but most that I have seen just use hard coded values, like above.


There are a couple of requirements for using the FTP. Here is an excerpt from the GIT page for it:

This allows you to FTP into your esp8266 and access/modify the spiffs folder/data...it only allows one ftp connection at a time....very simple for now...
I've tested it with Filezilla, and the basics work (upload/download/rename/delete). There's no create/modify directory support(no directory support in SPIFFS yet).
You need to setup Filezilla(or other client) to only allow 1 connection..
To force FileZilla to use the primary connection for data transfers:
Go to File/Site Manager then select your site.
In Transfer Settings, check "Limit number of simultaneous connections" and set the maximum to 1
only supports Passive ftp mode....
It does NOT support any encryption, so you'll have to disable any form of encryption...


HTH
it seems that after doing this, it interferes with the ability to transfer files via a device's browser. I don't have much time to mess with it, but think i will stick with xfer'ing files via that way instead of FTP, since the "admin" way requires really no guidelines unlike ftp, just a browser seems a bit easier with the only down side being you cant batch delete unless you pick the wipe storage option from browser and you can't rename files in the ESP, but you can just upload the renamed file and delete the old one easily.

if you look into this any further where both methods can co-exist that would be great, but im so slammed with work , which is actually a good thing , more of that $$$ :)
thanks again for the info above!
 
  • Like
Reactions: Sparkss and Leeful

Sparkss

Well-Known Member
Member
Joined
Jul 14, 2014
Messages
144
Trophies
0
Age
56
XP
432
Country
United States
You can look into the app cache db direct update that other hosting packs are using. It will directly update the DB and nothing that is not added would be "auto-magically" cached.

And for using the admin, info, config, etc. pages, as I mentioned, those are generated (dynamically) on the fly, so they will not be able to be cached and will not work when "offline" There is no way around that. Any page that you do not have a corresponding html for will not be able to be displayed via the cache. Those are all created in real-time by the code running on the ESP. The PS4 only sees the generated html, which is pushed to it (versus being read from a physical html file).

HTH :)
 
  • Like
Reactions: MasterZoilus

MasterZoilus

Well-Known Member
OP
Member
Joined
Sep 10, 2014
Messages
152
Trophies
0
Age
50
XP
662
Country
United States
  • Like
Reactions: KiiWii

KiiWii

Editorial Team
Editorial Team
Joined
Nov 17, 2008
Messages
16,651
Trophies
3
Website
defaultdnb.github.io
XP
27,121
Country
United Kingdom
@KiiWii are you sure about v2 because there is the other link here showing v3 and @Leeful has v3 on his exploit already, thats actually where i got the file from
https://github.com/stooged/DB_SG_Backup-50X/releases

Huh seems you’re right, I’m not sure which version I have in my beta... will have to check again, thank you lol.

Edit:

What’s funny is I trawled all the devs github repos this morning for updates: and I cannot remember which version I have been using now... need to fire up the laptop...
 
Last edited by KiiWii,
  • Like
Reactions: MasterZoilus

Leeful

GBAtemp Member
Developer
Joined
Sep 4, 2015
Messages
1,903
Trophies
1
XP
7,068
Country
United Kingdom
v3 is the latest. It was updated to include ApplicationCache.db for browser cache.

There are also 2 versions now. One backs up the db files and saves and the other just backs up the db's to save time.
 
Last edited by Leeful,
  • Like
Reactions: MasterZoilus

MasterZoilus

Well-Known Member
OP
Member
Joined
Sep 10, 2014
Messages
152
Trophies
0
Age
50
XP
662
Country
United States
v3 is the latest. It was updated to include ApplicationCache.db for browser cache.

There are also 2 versions now. One backs up the db files and saves and the other just backs up the db's to save time.

thanks @Leeful

@KiiWii - yeah i saw something briefly about BO3 online thing, but been so busy. The scene moves quick, so I gotta try to catch up with everything in a span of like 30minutes ;)
 
  • Like
Reactions: Leeful

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @btjunior, you act like if you were about 10