mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Detect redirect from stdout
This commit is contained in:
parent
74d2b60cf3
commit
366a3f9336
3 changed files with 6 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ def get_page(get=None, url=None, host=None, data=None):
|
|||
return result
|
||||
|
||||
def colorize(message):
|
||||
if not subprocess.mswindows:
|
||||
if not subprocess.mswindows and sys.stdout.isatty():
|
||||
message = re.sub(r"\[(.)\]", lambda match: "[%s%s\033[00;49m]" % (LEVEL_COLORS[match.group(1)], match.group(1)), message)
|
||||
message = message.replace("@sqlmap", "\033[00;96m@sqlmap\033[00;49m")
|
||||
message = message.replace(NAME, "\033[00;93m%s\033[00;49m" % NAME)
|
||||
|
|
@ -114,5 +114,7 @@ def main():
|
|||
if not found:
|
||||
print colorize("[o] nothing found")
|
||||
|
||||
print
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue