Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49514ad

Browse files
committed
Minor patch
1 parent 02b78d2 commit 49514ad

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

extra/wafdetectify/wafdetectify.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@
1111
import inspect
1212
import os
1313
import re
14+
import socket
15+
import ssl
1416
import subprocess
1517
import sys
1618
import urllib2
1719

1820
sys.dont_write_bytecode = True
1921

22+
if hasattr(ssl, "_create_unverified_context"):
23+
ssl._create_default_https_context = ssl._create_unverified_context
24+
2025
NAME, VERSION, AUTHOR = "WAF Detectify", "0.1", "sqlmap developers (@sqlmap)"
2126
TIMEOUT = 10
2227
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():
101106

102107
print colorize("[i] checking '%s'..." % sys.argv[1])
103108

109+
hostname = sys.argv[1].split("//")[-1].split('/')[0]
110+
try:
111+
socket.getaddrinfo(hostname, None)
112+
except socket.gaierror:
113+
print colorize("[x] host '%s' does not exist" % hostname)
114+
exit(1)
115+
104116
found = False
105117
for function, product in WAF_FUNCTIONS:
106118
if found and "unknown" in product.lower():
107119
continue
108120

109121
if function(get_page):
110-
print colorize("[!] WAF/IPS identified as '%s'" % product)
111-
found = True
122+
exit(colorize("[!] WAF/IPS identified as '%s'" % product))
112123

113124
if not found:
114125
print colorize("[o] nothing found")

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.3.1.24"
22+
VERSION = "1.3.1.25"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ e4805169a081b834ca51a60a150c7247 extra/shutils/newlines.py
2121
fb6be55d21a70765e35549af2484f762 extra/sqlharvest/__init__.py
2222
53d5dcba047f1285e32b9e88d2803ebf extra/sqlharvest/sqlharvest.py
2323
fb6be55d21a70765e35549af2484f762 extra/wafdetectify/__init__.py
24-
4d0912a9d16ab8cacd460649ed54d660 extra/wafdetectify/wafdetectify.py
24+
f73623c18b7f6ebb71f10e124b1b93c9 extra/wafdetectify/wafdetectify.py
2525
d0f2b424f5b2b06f26cdd7076d61be6e lib/controller/action.py
2626
02190e90bd7be774f800b7eabe589dd9 lib/controller/checks.py
2727
3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
4949
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
5050
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
5151
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
52-
a2e11fb9226d7b7348cff412042edd18 lib/core/settings.py
52+
41376018e1ec67c302bb69ded1c2b427 lib/core/settings.py
5353
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5454
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
5555
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py

0 commit comments

Comments
 (0)