Selenium is not an ideaideal 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 or OWASP ZAP, depending on your full set of use cases and available budget.