Jul-19-2018, 02:06 PM
I have a simple form on a remote webserver:
The target file post.php simply print the value of the POST param:
I need a Python code that:
I think it can be done by a Python proxy that acts as mitm (even using libraries, may be mitmproxy?).
I'll configure my browser to point to this local python proxy.
I am a newbie and don't know how to start: a simple code will help me to understand.
Thank you in advance for your time,
Gilberto
<form action="post.php" method="post"> <input type="text" name="p" value="abc"> <input type="submit"> </form>I load the remote page on my local browser by calling the url as usual.
The target file post.php simply print the value of the POST param:
Output:Array ( [p] => abc )
I need a Python code that:
- Runs on my local computer (the same one where the browser runs),
- Intercept the POST sent by the browser, modify the param p value (let's say xyz), and lastly
- Send the results to the original remote post.php, so that it will print back: Output:Array ( [p] => xyz )
I think it can be done by a Python proxy that acts as mitm (even using libraries, may be mitmproxy?).
I'll configure my browser to point to this local python proxy.
I am a newbie and don't know how to start: a simple code will help me to understand.
Thank you in advance for your time,
Gilberto