Selenium is not an idea tool for this kind of testing.  There are existing tools, which will be better suited to the task - Opening a browser, rendering the page and all the associated overhead is wasteful when conducting security testing!

I suggest [Burp suite][1] or [OWASP ZAP][2], depending on your full set of use cases and available budget.  







[1]: https://portswigger.net/burp
[2]: https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project