[Solved]Log post data to an external file, with a py script?


Anyone got a code for that?


Srsl, no body? I’m running in reverse mode…


maybe something similar to the dumper in this PR that just extracts request bodies?


what config do you have now? Do you already use any py script with mitmproxy?


maybe try mitmdump -nr [output_file] --set flow_detail=1 --showhost > [name_file]
but this is didn’t use py


I’ve come up with a more simple solution. Thanks Guys.

def request(flow):
    empty_request = b''
    if empty_request != flow.request.content :
        a = open('./post.txt', 'ab')
        a.write(flow.request.content + "\n".encode('ascii'))