Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50094

Questions about web browser reverse-engineering

$
0
0
I'm working on some web-browser based JS stuff, and looking at the Kindle's USB partition, I can see a folder called .active_content_sandbox

In there, there is are cached Kindle store files, such as index.html, secondaryStore.html, e.t.c.

Most of them are obfuscated, but I can see some code that is related to a custom window.kindle property:
Code:

if(!kindle || typeof kindle === 'undefined') {
                    var kindle = window.kindle || top.kindle;
                }
                var host = kindle;
               
                if (host.dev.webkitLog) {
                    host.dev.webkitLog('on');
                } 
               
                var Locale = window.Locale || top.Locale;
                var DateTimeFormat = window.DateTimeFormat || top.DateTimeFormat;
                var NumberFormat = window.NumberFormat || top.NumberFormat;

and also

Code:

kindle.dev.loadResource&&(kindle.dev.loadResource(window.frameElement?window.frameElement.id:"externalPage","jquery"),kindle.dev.setSensitivity(!0,1500)),kindle&&(kindle.chrome.setTitleBar("",pageTitle)

However, when I try to observer window.kindle from the browser, it merely shows up as undefined, running the following code:
Code:

for (prop in window) {
  log(prop);
}

Shows that it does indeed exist, however, checking its type shows as "undefined" and it appears to be inaccessible


Does anyone know anything about how this works???
Thanks

Viewing all articles
Browse latest Browse all 50094

Latest Images

Trending Articles



Latest Images