~tuxpup/parse-charles-log

Print headers and POST data from entries in a Charles proxy log in a format suitable for the requests library for python.
deprecate this. har2requests does what I wanted it to do in a much better way.
parse multipart forms into a dict of field:val
add option to filter by site for noisy logs.

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~tuxpup/parse-charles-log
read/write
git@git.sr.ht:~tuxpup/parse-charles-log

You can also use your local clone with git send-email.

#parse-charles-log

#Don't Use This

Unless you only have a bunch of chlsj logs and can't run charles, this is probably the wrong project to use.

This tool does less than half of what the tool I was imagining could do, and was thrown together out of desperation when I needed to automate a task on a broken SaaS product I was stuck with. I did it because I didn't know about .har files. If I had known about those, I would have instantly found https://github.com/louisabraham/har2requests and started with that for my automation instead of hacking this together.

If you have found this page, you almost certainly really want har2requests and should go there instead.

#Original README content

This is a quick-and-dirty commandline gadget that operates in two modes.

#List POST requests in file

parse-charles-log.py log.chlsj

Enumerates the POST requests in the specified Charles JSON file and prints the index and URL for each to standard output.

#Dump POST request details

parse-charles-log.py -d 0 log.chlsj

Dumps the headers and body of the POST request at the specified index to standard output in a format suitable for pasting into a python dict that can be used with the requests module.

#Credits

This uses a slightly modified version of @richtermb's pycharles library. I haven't thought my changes through carefully enough to contribute them upstream yet, so the source for that library is copied here, used under the MIT license.

#License

All source code in this repository is offered under the MIT license. See LICENSE for details.

Do not follow this link