19/01/2018
SchizoGizmo
lo chiamai SchizoGizmo… ora l'ho perso nel corso del tempo e delle memorie digitali dimenticate…
TODO Read FireFox Cache with Python firefox python zero
I had to write a program that does similar thing (locate and read firefox cache and show cache data) in Python. First I tried to automate the about:cache mechanism, but couldn't make it. Later I went for processing raw cache data…
But interestingly I didn't need to use all these knowledge. Just used regular expression to parse the data :-)
Programmatically reading firefox cache zero
My idea on how to painstakingly read the firefox cache…
import glob, re cache_folder = r"~/.cache/mozilla/firefox/[]/cache2\*" urls = set() for cache_filename in glob.glob(cache_folder): with open(cache_filename, 'rb') as file_cache: data = file_cache.read() urls |= set(re.findall("(http.*?)\x00", data)) for url in urls: print url
python - Programmatically reading firefox cache - Stack Overflow