« Installing latex on hostmonster | Turn off beep sound in firefox »

View contents of Zip/Jar files using firefox

With Firefox 3, you can use firefox browser to view contents of zip/jar files.
For viewing contents of filename.zip type following at location bar:

jar:file://< full path to filename.zip >!/
Example: jar:file:///home/user/Desktop/filename.zip!/
Also: jar:file:///home/user/Desktop/filename.zip!/dir/file1.js

This is specially very useful when you want to see contents (.js, .css, .html files) included in firefox extension’s jar file. After it list the contents, you can easily browse through the directory, sorting files etc.

Update: Security problems that come with jar: protocol
While serching for pages related to jar protocol in firefox, I found an interesting article at www.gnucitizen.org

In simple terms, it means that any application which allows upload of JAR/ZIP files is potentially vulnerable to a persistent Cross-site Scripting. Potential targets for this attack include applications such as web mail clients, collaboration systems, document sharing systems, almost everything that smells like Web2.0, etc, etc, etc.

Similar security concerns also arise in data: protocol in firefox. So one need to be careful to filter files you want to allow for upload. Actually, once I had similar situation with a website which allowed you to host image files, but the problem was they were not checking for file types. Thats means you are allowed to upload a php file too. So now you can do anything you want with that server (don’t ask me what I did :) ). So beware of such issues.

Related Post:
Perfect password according to firefox
View Page Source trick in firefox/flock
Firefox about pages
Cross Site Scripting

Comments

2 Responses to “View contents of Zip/Jar files using firefox”

  1. foxiewire.com on May 13th, 2008 8:33 pm

    View contents of Zip/Jar files using firefox…

    A trick to view contents of zip/jar files in firefox 3. For viewing contents of filename.zip type following at location bar:jar:file://< full path to filename.zip >!/ …

  2. Grzglo Tech Blog on May 13th, 2008 10:51 pm

    Podgl?d plików Zip/Jar w Firefoksie 3

    Ajit Burad poinformowa?, ?e w trzeciej wersji Firefoksa, mo?liwe jest przegl?danie zawarto?ci plików Zip/Jar.

    Aby wy?wietli? zawarto?? pliku nazwa_pliku.zip nale?y w pasku adresu wpisa? nast?puj?c? lokalizacj?…

    http://grzglo.jogger.pl/2008/05/14/podglad-plikow-zip-jar-w-firefoksie-3/

Leave a Reply