how to get content from about:cache?device=disk
I have a set of images which I`d like to get from my firefox cache(about:cache?device=disk), the thing is there is a pattern in the field Key that I can use to query these files that I want, but the problem is, how can I write a program to get this content?! some suggestion?! can be in python, java, c++ it doesnt really matter the language for me, just looking for some suggestion!
thanks!开发者_如何学Go
Here's a cache viewer app, built as a Firefox add-on: https://addons.mozilla.org/en-US/firefox/addon/cacheviewer/
For writing your own program, the Firefox/Mozilla cache format is documented here: http://www.pyflag.net/cgi-bin/moin.cgi/Mozilla_Cache_Format
That documentation is part of pyflag, a forensic analysis tool. Here's the Python source code that reads the cache info: http://www.pyflag.net/pyflag/src/FileFormats/MozCache.py
Put this in your .bashrc
export VIDEOS_REGX="\([[:space:]]AVI\)\|\(MPEG.sequence\)\|\(ASF\)\|\(ISO.Media\)\|\(Flash.Video\)"
function findvideos {
if [[ -f videos.txt ]];
then cat videos.txt;
else dofindvideos;
fi;
}
alias dofindvideos="find -exec file {} \; | grep -i '$VIDEOS_REGX' | cut -f 1 -d: | tee videos.txt"
alias playvideos="cat videos.txt | xargs vlc"
alias findimages="find | xargs file| egrep image | cut -f 1 -d: | tee images.txt"
Then resource it
$ cd
$ source .bashrc
go to your cache folder and type
$ findvideos
to find all videos, or
$ findimages
to find all images.
You can view your images by installing qiv then typing at the same location :
$ qiv -F image.txt
You can view you all your videos by installing vlc then typing at the same location :
$ playvideos
Hope that helps
精彩评论