3

I can't download the file anymore, but it's still sitting in my Firefox cache. Using about:cache, I can see the file as an xhtml page showing the encoding, filetype, etc... and then three columns of gibberish. It looks like binary or hex code. Can I somehow copy/paste this code to make it a working file? Or use some app to convert it? What exactly do I need, just the first two columns? Just the middle?

This is the first few lines of file:

00000000:  1f  8b  08  00  00  00  00  00  00  03  64  7a  65  50  1d  c1  ..........dzeP..
00000010:  d6  ed  01  0e  ee  c1  1d  02  c1  1d  82  bb  bb  bb  9e  e0  ................
00000020:  1e  82  bb  bb  bb  07  27  b8  6b  70  77  77  77  77  97  20  ......'.kpwwww. 
3
  • You'd need to extract the hex code - that's all the two-digit values - and save them into a file. Assuming of course you know which encoding it should use.
    – user3463
    Mar 28, 2011 at 4:50
  • so, copy paste all the 2 digit stuff into a plain text file, save, close, rename to have the correct extension... and it should be usable by a program? Any spaces between the characters? Line breaks?
    – CreeDorofl
    Mar 28, 2011 at 5:14
  • Related on Stackoverflow: Clean Hex dump of ASCII code
    – Marc.2377
    Aug 2, 2017 at 2:53

1 Answer 1

2

This is a simple endeavor. Everything in the cache is stored in simple binary, and with 2 programs I was easily able to extract a 10mb cached item. These apps were HxD and Scite. I used Scite to clean the hex for Hxd to accept.

All I did was copy all of the data in the 3 columns and paste it in to Scite. Then, in Scite, I clicked on the very first number (the first 0 in 00000000: ), and then I went to Search->Replace. I checked the "wrap around" and "regular expression" check boxes, and my query was as so:

Find what:

\\(...........\\)\\(.*\\)\\(.................\\)

Replace with:

\2

Then I unchecked "regular expression", and I checked "Transform backslash expressions" (They don't work together) and I entered in a new query:

Find what:

\r\n

Replace with:

  

That's 2 spaces in the replace with, just so you know.

Now you should have uncontaminated hex data. now copy it and paste it in to HxD, and save it. You should now have an operable file.

I just mentioned Scite and HxD here because I had them handy. In reality, any RegEx capable text editor and any hex editor should be fine.

There's probably a simpler way, but this works for me. Good luck.

7
  • I'm almost following you but I'm finding myself being lazy with scite. I downloaded the windows zip and there's no setup or executable. I don't really want to compile scite just for this. What do I need for it to be pure hex? Right now I have a text file, each line is like this: 1f 8b 08 00 00 00 00 00 00 03 64 7a 65 50 1d ...is that search and replace eliminating line breaks and replacing with 2 spaces?
    – CreeDorofl
    Mar 28, 2011 at 5:29
  • The second search? Yes.
    – Kaslai
    Mar 28, 2011 at 5:31
  • ok, so, the final format will be ## ## ## all on a single line? This I can paste into HxD, save as file.whatever and it's good?
    – CreeDorofl
    Mar 28, 2011 at 5:35
  • Yes, and actually I just realized that it shouldn't be necessary to remove the newlines.
    – Kaslai
    Mar 28, 2011 at 5:40
  • I'm gonna mark your answer as good, even though after all the effort the file doesn't seem to work :) Firefox tells me the content size and my saved file matches exactly, the hex characters are identical... so I think I've created my file properly. Firefox does say it's zlib compressed, but firefox viewed the file fine anyway. Still, should I decompress it?
    – CreeDorofl
    Mar 28, 2011 at 5:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .