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

Skip to content

Commit fd705c3

Browse files
committed
Baby steps
1 parent db3bed3 commit fd705c3

13 files changed

Lines changed: 51 additions & 33 deletions

File tree

extra/wafdetectify/wafdetectify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def main():
126126
if not found:
127127
print(colorize("[o] nothing found"))
128128

129-
print
129+
print()
130130

131131
exit(int(not found))
132132

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.61"
22+
VERSION = "1.3.1.62"
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)

lib/core/threads.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8+
from __future__ import print_function
9+
810
import difflib
911
import random
1012
import threading
@@ -167,7 +169,7 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
167169
time.sleep(0.1)
168170

169171
except (KeyboardInterrupt, SqlmapUserQuitException) as ex:
170-
print
172+
print()
171173
kb.prependFlag = False
172174
kb.threadContinue = False
173175
kb.threadException = True
@@ -185,7 +187,7 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
185187
raise
186188

187189
except (SqlmapConnectionException, SqlmapValueException) as ex:
188-
print
190+
print()
189191
kb.threadException = True
190192
logger.error("thread %s: %s" % (threading.currentThread().getName(), ex.message))
191193

@@ -195,7 +197,7 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
195197
except:
196198
from lib.core.common import unhandledExceptionMessage
197199

198-
print
200+
print()
199201
kb.threadException = True
200202
errMsg = unhandledExceptionMessage()
201203
logger.error("thread %s: %s" % (threading.currentThread().getName(), errMsg))

lib/parse/cmdline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ def _(self, *args):
794794
command = raw_input("sqlmap-shell> ").strip()
795795
command = getUnicode(command, encoding=sys.stdin.encoding)
796796
except (KeyboardInterrupt, EOFError):
797-
print
797+
print()
798798
raise SqlmapShellQuitException
799799

800800
if not command:

lib/request/inject.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8+
from __future__ import print_function
9+
810
import re
911
import time
1012

@@ -277,7 +279,7 @@ def _goInferenceProxy(expression, fromUser=False, batch=False, unpack=True, char
277279
raise SqlmapDataException(errMsg)
278280

279281
except KeyboardInterrupt:
280-
print
282+
print()
281283
warnMsg = "user aborted during dumping phase"
282284
logger.warn(warnMsg)
283285

lib/takeover/abstraction.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8+
from __future__ import print_function
9+
810
import sys
911

1012
from extra.safe2bin.safe2bin import safechardecode
@@ -129,11 +131,11 @@ def shell(self):
129131
command = raw_input("os-shell> ")
130132
command = getUnicode(command, encoding=sys.stdin.encoding)
131133
except KeyboardInterrupt:
132-
print
134+
print()
133135
errMsg = "user aborted"
134136
logger.error(errMsg)
135137
except EOFError:
136-
print
138+
print()
137139
errMsg = "exit"
138140
logger.error(errMsg)
139141
break

lib/takeover/metasploit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8+
from __future__ import print_function
9+
810
import os
911
import re
1012
import select
@@ -483,7 +485,7 @@ def _loadMetExtensions(self, proc, metSess):
483485
send_all(proc, "getuid\n")
484486

485487
if conf.privEsc:
486-
print
488+
print()
487489

488490
infoMsg = "trying to escalate privileges using Meterpreter "
489491
infoMsg += "'getsystem' command which tries different "

lib/techniques/error/use.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8+
from __future__ import print_function
9+
810
import re
911
import time
1012

@@ -242,7 +244,7 @@ def _errorFields(expression, expressionFields, expressionFieldsList, num=None, e
242244

243245
if not suppressOutput:
244246
if kb.fileReadMode and output and output.strip():
245-
print
247+
print()
246248
elif output is not None and not (threadData.resumed and kb.suppressResumeInfo) and not (emptyFields and field in emptyFields):
247249
status = "[%s] [INFO] %s: '%s'" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", output if kb.safeCharEncode else safecharencode(output))
248250

lib/utils/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
See the file 'LICENSE' for copying permission
77
"""
88

9+
from __future__ import print_function
10+
911
import contextlib
1012
import httplib
1113
import logging
@@ -762,7 +764,7 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=Non
762764
command = raw_input("api%s> " % (" (%s)" % taskid if taskid else "")).strip()
763765
command = re.sub(r"\A(\w+)", lambda match: match.group(1).lower(), command)
764766
except (EOFError, KeyboardInterrupt):
765-
print
767+
print()
766768
break
767769

768770
if command in ("data", "log", "status", "stop", "kill"):

lib/utils/hash.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
See the file 'LICENSE' for copying permission
66
"""
77

8+
from __future__ import print_function
9+
810
try:
911
from crypt import crypt
1012
except: # removed ImportError because of https://github.com/sqlmapproject/sqlmap/issues/3171
@@ -1061,7 +1063,7 @@ def dictionaryAttack(attack_dict):
10611063
_bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, 0, 1, kb.wordlists, custom_wordlist, conf.api)
10621064

10631065
except KeyboardInterrupt:
1064-
print
1066+
print()
10651067
processException = True
10661068
warnMsg = "user aborted during dictionary-based attack phase (Ctrl+C was pressed)"
10671069
logger.warn(warnMsg)
@@ -1157,7 +1159,7 @@ class Value():
11571159
found = found_.value
11581160

11591161
except KeyboardInterrupt:
1160-
print
1162+
print()
11611163
processException = True
11621164
warnMsg = "user aborted during dictionary-based attack phase (Ctrl+C was pressed)"
11631165
logger.warn(warnMsg)

0 commit comments

Comments
 (0)