Go Back   Carder.life > [ru] Forum for Russians > Хакинг. Программирование



Reply
 
Thread Tools Display Modes
  #1  
Old 05-15-2025, 08:10 PM

almighty almighty is offline
Banned
Join Date: Oct 2024
Posts: 13
Default


Code:
import os
import sys
import urllib
def log_crt(name, text):
if os.path.exists(name):
open(name, 'a+').write(text)
return True
else:
return False
def sites(name, id):
if os.path.exists(name):
text = open(name, 'r').readlines()
return text[id]
else:
sys.exit(1)
print("[!] SQL Inj checker")
if __name__ == "__main__":
if sys.argv[1] != "" and sys.argv[2] != "":
for i in range(0, len(open(sys.argv[1], 'r').readlines())):
site = sites(sys.argv[1], i)
try:
html = urllib.urlopen(site + "'").read()
if 'SQL' in html or 'syntax' in html or 'Warning' in html:
log_crt(sys.argv[2], site)
print("[\033[1;32mGOOD\033[1;m] " + site)
else:
print("[\033[1;31mERROR\033[1;m] " + site)
except:
pass
print("[\033[1;32mDellete repeat domains\033[1;m]")
for i in range(0, len(open(sys.argv[2], 'r').readlines())):
domain = sites(sys.argv[2], i).replace('http://', '').split('/')
for j in range(0, len(open(sys.argv[2], 'r').readlines())):
dell_domain = sites(sys.argv[2], i).replace('http://', '').split('/')
if(dell_domain[0] == domain[0]):
f = open(sys.argv[2]).read()
f.replace(sites(sys.argv[2], j), '')
print("[\033[1;32mDone\033[1;m]")
else:
print("Error!")

Написал за пару минут и сам его использую, запускать так: python script_name.py файл_с_сайтами.txt файл_для_сохранения_резуль� �атов.txt
Reply

Tags
NULL


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump




All times are GMT. The time now is 07:38 PM.