Automatic detection of SQL injection with Python

Our focus here is to understand how can we automate the detection of SQL injections with the help of Python. Whenever we talk about SQL injections, the tool that comes to our mind is SQLmap, an excellent tool that is my personal favorite for detecting SQL injection in web applications. There are a number of tutorials on the internet about how to use SQLmap to detect SQL injection. In this section, we will see how can we use the server version of SQLmap, which exposes an API, to automate the whole process of detecting SQL injection vulnerabilities. We will use a Python script in order to automate the detection process.

Let's start the SQLmap server:

Now that the server is up and running on ...

Get Hands-On Penetration Testing with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.