05-15-2017, 02:03 PM | #1 |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Using the Experminental Browser for local files
I don't see any recent discussions about this, so I thought I'd bring it up again.
I was playing around in the Experimental Browser on my PW3, and found I was able to open HTML files on the local folders. I was not able to follow relative links in the file, but absolute links did work Code:
<a href="#Chapter21">Doesn't work</a> Code:
<a href="/mnt/us/LesMiserables.html">Does work</a> |
05-15-2017, 02:10 PM | #2 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Rename the file extension to: .txt
Then you can open it in the book reader (the book reader does html also). |
05-15-2017, 02:39 PM | #3 |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
To clarify, I am looking to start a discussion about useful things that we can do inside of the browser, not in the reading programs.
I have found some things that I think would be useful for developers, and wanted to know if we had an existing thread about it. I know there was an ancient thread about using NPAPI ( Netscape plugin API ), to run LIPC commands from the browser, but that has been removed form more recent firmware. |
05-15-2017, 05:18 PM | #4 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
But now you know the browser is not the only thing that will display html on the Kindle. The NPAPI was pulled because of the security threat that it posed to the system. That was the one responsible for CERT notice on the Kindles. (I posted a link to that fairly recently in response to some other question here.) But knowing how to open a document in the browser would be nice to document (you might want to start a Wiki page on the subject). IIRC, the last time anything on that was posted here was about 5.3.x or 5.4.x firmware version. And maybe a comparison between the current firmware's browser implementation and our build of Skipstone (which is also getting fairly old by now). There are users here that only use Skipstone (on K5, IIRC). So there are users here that would be interested if Lab126 has closed the feature gap any over the last couple of years. Last edited by knc1; 05-15-2017 at 05:23 PM. |
|
05-16-2017, 10:53 AM | #5 |
Enthusiast
Posts: 37
Karma: 50278
Join Date: Feb 2017
Device: Kindle PW3
|
note
Just In case you didnt know, file:///mnt/us/ on the browser lets you navigate your file contents.
|
05-16-2017, 11:31 AM | #6 |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Yeah, I'll put it in the thread, because it doesn't look like it's out there yet:
if you put an html document in the root folder, you can navigate to it at file:///mnt/us/index.html. If you put a link to the system root in that document, you can get there, and it will list the directories. Code:
<a href="/">FS Root</a> Not all folders are available though, for example "/usr/bin" is not available, but "/usr/java/lib/fonts" is, which isn't too useful. I have not yet tried putting in an href to one of the folders that doesn't shop up on the list, if anyone wants to try. one problem, is that you cannot use the back button, because that correctly triggers the protections, same as if you had tried to put /etc into the address bar manually. I wonder if Javascript and a frame could be used to take care of that issue. |
05-16-2017, 01:02 PM | #7 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
It might very well only be showing you what is in the chroot.
(Which isn't complete.) Find something you can do that causes the Kindle to reboot to 'diags' - IIRC. we can jailbreak 'diags'. and/or Try viewing the previous "universal" (poison file name) jailbreak in the browser, see if they fixed the browser when they 'fixed' the poison file name method. That is, this one: https://www.mobileread.com/forums/sh...d.php?t=186645 Last edited by knc1; 05-16-2017 at 01:18 PM. |
05-16-2017, 05:03 PM | #8 |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
I know that I cannot use filenames like that in the search shortcuts, lipc-set throws an error on all the fun characters like
Code:
$, (, ', " etc. But there is some different behavior from typing an address in, vs clicking al ink to the same path that I will play with. Last edited by coplate; 05-16-2017 at 05:06 PM. |
05-16-2017, 05:46 PM | #9 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
That caused me to think that the browser had not been checked if it is subject to "poison URLs". Very old school way to subvert a *nix system, but still worth checking. = = = = There are people here that would like to see nested collections brought back (Kindles used to support nested collections). It would be a rather straight foreward processing problem to copy the directory structure under /documents into a html page. Find and look into the interior of my "cpu report" - that is the one with script generated html that the reader likes. All of the grouping html functions seem to be working in the reader. I never opened it with the browser - but I suppose you could (might have to rename the filename extension). Last edited by knc1; 05-16-2017 at 05:52 PM. |
|
05-16-2017, 08:01 PM | #10 |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
Hmm. I'm not sure I can think of anything useful to do, maybe I'm misunderstanding the what you main by "poison url".
From what you linked, the update was named with the shell script included in it, withthe hope that the script that runs that would execute in a shell, yeah? I'm not sure what to try to use that in the browser. I have tried this, and it did open a regular file with that name Code:
<a href="./index$(date).html?var=$(date)">CLICK ME</a> <br /> |
05-16-2017, 08:08 PM | #11 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
That is interesting.
If I understand you correctly (the variables do de-reference) we can execute 'date' with the browser. That is a step in the right direction. Now if we can execute idme (with arguments) the Kindle can be forced to reboot to 'diags' - which we should be able to jailbreak. = = = = Yes, if a program on a *nix (POSIX compliant - which the Kindle OS is) opens that with: Code:
#include <stdlib.h> int system(const char *command) Been there since K&R days. Amazon no longer uses the 'system' call to open a file before they sanitize the filename.* (Which is how they 'fixed' our prior universal jailbreak.) * Somebody @Lab126 finally RTFM (man system). (and these are the people (Amazon) that run Linux on the world's 18th largest super computer - IIRC the last time I checked) Last edited by knc1; 05-16-2017 at 08:25 PM. |
05-16-2017, 08:19 PM | #12 |
Guru
Posts: 645
Karma: 1888888
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
|
|
05-16-2017, 08:20 PM | #13 |
Member
Posts: 15
Karma: 49874
Join Date: May 2017
Device: Kindle Paperwhite
|
Is it possible to make an ebook(azw3/mobi) linking all other books? So that, when I click a link, it will open that book.
|
05-16-2017, 08:28 PM | #14 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Note that 8th. generation Kindles are suppose to have azw3 active content disabled (but they don't in Germany). But that is the reason we have to provide a booklet version of KUAL for those devices outside of Germany. |
|
05-16-2017, 08:37 PM | #15 |
Member
Posts: 15
Karma: 49874
Join Date: May 2017
Device: Kindle Paperwhite
|
Thanks knc1 for the reply. In my case, it is not jail broken and firmware version is 5.8.9 :-(
Any other way to make a catalog like this? My device is paperwhite 7th generation. |
Tags |
browser, html |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Local html in browser? | mm5 | iRiver Story | 2 | 02-16-2012 06:43 PM |
local html file with K3 browser | Reeeder | Kindle Developer's Corner | 0 | 08-28-2011 05:41 AM |
PRS-950 Can PRS-950 web browser view local HTML files? | roc | Sony Reader | 3 | 04-02-2011 10:58 AM |
Browser doesn't load local HTML files? | kenjennings | enTourage Archive | 1 | 02-19-2011 09:52 AM |
Kindle Browser and local files | slm | Amazon Kindle | 2 | 06-03-2008 08:29 PM |