Chris's website

File access demo

By on , updated on

Modern browsers block access to file:// URLs from webpages that are not “hosted” on file://. This URL that points towards /etc/passwd should NOT work.

This image shouldn’t show up if page is served over HTTP
This image shouldn’t show up if page is served over HTTP or the browser is running in sandboxed mode
JavaScript can’t do it either:

Output will be shown below.

But download this page and open it from your local file system and some of things listed on this page will work!

View the source code of this page