Security & Hacking

Find SQL injections using python script 2020

Find SQL injections

Find SQL injections

Download Script https://github.com/ThomasTJdev/python_gdork_sqli

This python script is developed to show, how many vulnerable websites, which are laying around on the web. The main focus of the script is to generate a list of vuln URLs. Please use the script with causing and alert the web admins of vulnerable pages. The SQLmap implementation is just for showcasing.

Requirements

  • python3
  • BeautifulSoup from bs4
  • (optional) sqlmap

The script

The script is divided into 3 main sections.

Section 1

In this section, you’ll have to provide a search string, which ‘connects’ to the website’s database, e.g. ‘PHP?id=’. The script then crawls Bing or Google for URLs containing it. All of the URLs can then be saved into a file. (Please be aware that you might get banned for crawling too fast, remember an appropriate break/sleep between request).¬†Example of searches: PHP?bookid=, PHP?idproduct=, PHP?bookid=, php?catid=,¬†PHP?action=, php?cart_id=, PHP?title=, Php?itemid=

Section 2

This section adds a qoute ‘ to the websites url. If the website is prone to SQL injection, we’ll catch this with some predefined error messages. The script will not add websites for blind SQL injections, due to the predefined error messages.

Section 3

This is just an activation of sqlmap with the bulk argument and no user interaction for validation of SQL injection.

Stay safe and help the vulnerables

Tags
Show More

Related Articles

Leave a Reply

Leave a Reply

  Subscribe  
Notify of

Check Also

Close
Back to top button
Close
%d bloggers like this: