atom / archive-view

Open compressed files in Atom
MIT License
31 stars 32 forks source link

[feature RFC] updating changed files back to archives & modifying WebKit .webarchive (plist-based) dumps #20

Open kfix opened 9 years ago

kfix commented 9 years ago

I save .webarchives from Safari to debug WebKit-specific issues for sites I do not control. These are just plist-format XMLs with a flat array of Base64-blobs for every asset loaded in the browser, tagged with their URLs. so it can be represented as a flat archive tree with no subdirectories.

if you edit any blob, save it back to the webarchive and reload it in Safari, the changed data is still rendered as the authoritative representation of each remote URL and passes all the browser's security validation. this workflow is IMHO far nicer and more reliable than scraping and then plugging individual URLs into a MITM proxy for debugging/fuzzing code & markup. plus you can send the tweaked .webarchive back upstream for instantly reproducing the reported problem and fix.

I'm currently using a python script in Terminal to extract URLs to tmpfiles, prettify them, open in vim, and save them back to blobs. I think atom could be extended to seamlessly do this on open/save to .webarchives, as well as integrate with users' custom workflows, such as automatic browser refreshing.

currently archive-view doesn't seem to update any archives' contents when any extracted file is changed. do you think its desirable to add that functionality to the plugin for all archive-formats, so I could then add specific support for .webarchives ?

kfix commented 9 years ago

Vim does seem to support writing-back tar files

thedaniel commented 9 years ago

This would be a pretty cool enhancement.