Minor patch

This commit is contained in:
Miroslav Stampar 2019-01-08 12:58:27 +01:00
parent 02b78d2691
commit 49514adcd9
3 changed files with 16 additions and 5 deletions

View File

@ -11,12 +11,17 @@ import httplib
import inspect import inspect
import os import os
import re import re
import socket
import ssl
import subprocess import subprocess
import sys import sys
import urllib2 import urllib2
sys.dont_write_bytecode = True sys.dont_write_bytecode = True
if hasattr(ssl, "_create_unverified_context"):
ssl._create_default_https_context = ssl._create_unverified_context
NAME, VERSION, AUTHOR = "WAF Detectify", "0.1", "sqlmap developers (@sqlmap)" NAME, VERSION, AUTHOR = "WAF Detectify", "0.1", "sqlmap developers (@sqlmap)"
TIMEOUT = 10 TIMEOUT = 10
HEADERS = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "identity", "Cache-Control": "max-age=0"} HEADERS = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "identity", "Cache-Control": "max-age=0"}
@ -101,14 +106,20 @@ def main():
print colorize("[i] checking '%s'..." % sys.argv[1]) print colorize("[i] checking '%s'..." % sys.argv[1])
hostname = sys.argv[1].split("//")[-1].split('/')[0]
try:
socket.getaddrinfo(hostname, None)
except socket.gaierror:
print colorize("[x] host '%s' does not exist" % hostname)
exit(1)
found = False found = False
for function, product in WAF_FUNCTIONS: for function, product in WAF_FUNCTIONS:
if found and "unknown" in product.lower(): if found and "unknown" in product.lower():
continue continue
if function(get_page): if function(get_page):
print colorize("[!] WAF/IPS identified as '%s'" % product) exit(colorize("[!] WAF/IPS identified as '%s'" % product))
found = True
if not found: if not found:
print colorize("[o] nothing found") print colorize("[o] nothing found")

View File

@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.1.24" VERSION = "1.3.1.25"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -21,7 +21,7 @@ e4805169a081b834ca51a60a150c7247 extra/shutils/newlines.py
fb6be55d21a70765e35549af2484f762 extra/sqlharvest/__init__.py fb6be55d21a70765e35549af2484f762 extra/sqlharvest/__init__.py
53d5dcba047f1285e32b9e88d2803ebf extra/sqlharvest/sqlharvest.py 53d5dcba047f1285e32b9e88d2803ebf extra/sqlharvest/sqlharvest.py
fb6be55d21a70765e35549af2484f762 extra/wafdetectify/__init__.py fb6be55d21a70765e35549af2484f762 extra/wafdetectify/__init__.py
4d0912a9d16ab8cacd460649ed54d660 extra/wafdetectify/wafdetectify.py f73623c18b7f6ebb71f10e124b1b93c9 extra/wafdetectify/wafdetectify.py
d0f2b424f5b2b06f26cdd7076d61be6e lib/controller/action.py d0f2b424f5b2b06f26cdd7076d61be6e lib/controller/action.py
02190e90bd7be774f800b7eabe589dd9 lib/controller/checks.py 02190e90bd7be774f800b7eabe589dd9 lib/controller/checks.py
3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py 3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py
@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py 9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py 3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
a2e11fb9226d7b7348cff412042edd18 lib/core/settings.py 41376018e1ec67c302bb69ded1c2b427 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py 5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py