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

Skip to content

Commit 366a3f9

Browse files
committed
Detect redirect from stdout
1 parent 74d2b60 commit 366a3f9

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

extra/wafdetectify/wafdetectify.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_page(get=None, url=None, host=None, data=None):
5454
return result
5555

5656
def colorize(message):
57-
if not subprocess.mswindows:
57+
if not subprocess.mswindows and sys.stdout.isatty():
5858
message = re.sub(r"\[(.)\]", lambda match: "[%s%s\033[00;49m]" % (LEVEL_COLORS[match.group(1)], match.group(1)), message)
5959
message = message.replace("@sqlmap", "\033[00;96m@sqlmap\033[00;49m")
6060
message = message.replace(NAME, "\033[00;93m%s\033[00;49m" % NAME)
@@ -114,5 +114,7 @@ def main():
114114
if not found:
115115
print colorize("[o] nothing found")
116116

117+
print
118+
117119
if __name__ == "__main__":
118120
main()

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.2.8.25"
22+
VERSION = "1.2.8.26"
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
@@ -22,7 +22,7 @@ e4805169a081b834ca51a60a150c7247 extra/shutils/newlines.py
2222
1e5532ede194ac9c083891c2f02bca93 extra/sqlharvest/__init__.py
2323
b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py
2424
1e5532ede194ac9c083891c2f02bca93 extra/wafdetectify/__init__.py
25-
85ca5478dc2bd9db40772e52dad2f84a extra/wafdetectify/wafdetectify.py
25+
5a5d4305e9dd22c3ba06b8587dad9db7 extra/wafdetectify/wafdetectify.py
2626
3459c562a6abb9b4bdcc36925f751f3e lib/controller/action.py
2727
7493c782345a60f6c00c9281d51a494e lib/controller/checks.py
2828
c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py
@@ -50,7 +50,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
5050
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5151
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5252
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
53-
13758369fddb4d7e791e989966908ee6 lib/core/settings.py
53+
d30a78044622a9f97a2b62eec4c62e95 lib/core/settings.py
5454
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5555
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5656
815d1cf27f0f8738d81531e73149867d lib/core/target.py

0 commit comments

Comments
 (0)