├── requirements.txt ├── README.md └── SQLI-Finder.py /requirements.txt: -------------------------------------------------------------------------------- 1 | terminal_banner 2 | termcolor 3 | google 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

SQL-Injection-Finder

2 |

A simple tool to find sql injection vulnerability using google dorks.


3 |
4 | 5 |
6 | 7 | ## Installation 8 | ```bash 9 | git clone https://github.com/j1t3sh/SQL-Injection-Finder.git 10 | cd SQL-Injection-Finder 11 | pip3 install -r requirements.txt 12 | 13 | ``` 14 | ## Usage 15 | ```bash 16 | python3 SQLI-Finder.py 17 | ``` 18 | 19 | ## Tips 20 | Use Google hacking database(https://www.exploit-db.com/google-hacking-database) for good sqli dorks. 21 | 22 | # HAPPY HUNTING 23 | -------------------------------------------------------------------------------- /SQLI-Finder.py: -------------------------------------------------------------------------------- 1 | #/usr/bin/python3 2 | from googlesearch import search 3 | from socket import timeout 4 | import sys 5 | from termcolor import colored 6 | import urllib 7 | import urllib.request 8 | import terminal_banner 9 | import random 10 | import os 11 | 12 | 13 | os. system('clear') 14 | 15 | banner = (""" 16 | 17 | ╔═╗╔═╗ ╦ ╦ ╔═╗╦╔╗╔╔╦╗╔═╗╦═╗ 18 | ╚═╗║═╬╗║ ║───╠╣ ║║║║ ║║║╣ ╠╦╝ 19 | ╚═╝╚═╝╚╩═╝╩ ╚ ╩╝╚╝═╩╝╚═╝╩╚═ 20 | Made with ❤️ 21 | For the Community, By the Community 22 | 23 | ################################### 24 | 25 | Developed by Jitesh Kumar 26 | Intagram - https://instagram.com/jitesh.haxx 27 | linkedin - https://linkedin.com/j1t3sh 28 | Github - https://github.com/j1t3sh 29 | 30 | ( DONT COPY THE CODE. CONTRIBUTIONS ARE MOST WELCOME ❤️ ) 31 | 32 | """) 33 | banner_terminal = terminal_banner.Banner(banner) 34 | print (colored(banner_terminal, 'green')+ "\n") 35 | 36 | website_list=[] #list of websites 37 | dork = "inurl:" + input(colored("Please input the sqli Dork(eg- php?id=, aspx?id=) ----> ",'cyan')) 38 | extension = "site:" + input(colored("Please specify the website extension(eg- .in,.com,.pk) [default: none] -----> ",'cyan')) #Add none as extension 39 | total_output = int(input(colored("Pleases specify the total no. of websites you want) ----> ",'cyan'))) 40 | page_no = int(input(colored("From which Google page you want to start(eg- 1,2,3) ----> ",'cyan'))) 41 | 42 | if extension == "site:": 43 | extenstion = "" 44 | 45 | try: 46 | query = dork + " " + extension 47 | pause_random = int(random.randrange(4, 10, 2)) 48 | for j in search(query, num=10,start=page_no*5,stop=total_output, pause=pause_random, 49 | user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36'): #add User-Agent 50 | website_list.append(j) 51 | 52 | for i in website_list: 53 | try: 54 | fullurl = i 55 | try: 56 | resp = urllib.request.urlopen(fullurl + "'", timeout=15) #set timeout 57 | except timeout: 58 | print (i + " ===> " + colored("Time out !",'orange')) 59 | pass #pass if website not responding after 15 seconds 60 | body = resp.read() 61 | fullbody = body.decode('utf-8') 62 | if "SQL syntax" in fullbody: 63 | print(i + " ===> " + colored(" Vulnerable!",'green')) #if vulnerable 64 | else: 65 | print (i + " ===> " + colored(" Not Vulnerable!",'red')) #if not vulnerable 66 | 67 | except: 68 | print(i + " ===> " + colored(" Can not be Determined",'blue')) 69 | continue 70 | except: 71 | 72 | print("Your IP has been blocked by Google, Wait for 1 hr. ") 73 | print("Go chill outside then comeback & start to hunt again :)") 74 | --------------------------------------------------------------------------------