(<)





19/01/2018

SchizoGizmo

<2018-01-18 gio> qualche anno fa accrocchiai un programmino in perl che leggeva la cache di firefox vi cercava file html e immagini, poi analizzava gli html e quando trovava l'url di un'immagine la andava a sostituire con una presa a caso tra quelle presenti nella cache;
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

<2018-01-18 gio>

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 :-)

Read FireFox Cache with Python

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

firefox cache & Python

Categorie: firefox zero
contatti > @|^|)))