From c67c483fdb24c11ab2ff6b17a0c255f4001556b9 Mon Sep 17 00:00:00 2001
From: akun <6awkun@gmail.com>
Date: Thu, 1 Feb 2018 21:12:43 +0800
Subject: [PATCH] Refactoring for Python 3 `print`
* 2to3 `ls | grep -v thirdparty` -f print
---
extra/cloak/cloak.py | 4 ++--
extra/dbgtool/dbgtool.py | 6 +++---
extra/mssqlsig/update.py | 8 ++++----
extra/safe2bin/safe2bin.py | 2 +-
extra/shutils/duplicates.py | 2 +-
extra/shutils/pylint.py | 18 +++++++++---------
extra/shutils/regressiontest.py | 2 +-
extra/sqlharvest/sqlharvest.py | 6 +++---
lib/core/threads.py | 6 +++---
lib/parse/cmdline.py | 4 ++--
lib/request/dns.py | 4 ++--
lib/request/inject.py | 2 +-
lib/takeover/abstraction.py | 4 ++--
lib/takeover/metasploit.py | 2 +-
lib/techniques/error/use.py | 2 +-
lib/utils/api.py | 2 +-
lib/utils/hash.py | 4 ++--
plugins/generic/custom.py | 4 ++--
sqlmap.py | 14 +++++++-------
19 files changed, 48 insertions(+), 48 deletions(-)
diff --git a/extra/cloak/cloak.py b/extra/cloak/cloak.py
index cc95e5a99..d1fe2db1f 100644
--- a/extra/cloak/cloak.py
+++ b/extra/cloak/cloak.py
@@ -38,7 +38,7 @@ def decloak(inputFile=None, data=None):
try:
data = zlib.decompress(hideAscii(data))
except:
- print 'ERROR: the provided input file \'%s\' does not contain valid cloaked content' % inputFile
+ print('ERROR: the provided input file \'%s\' does not contain valid cloaked content' % inputFile)
sys.exit(1)
finally:
f.close()
@@ -63,7 +63,7 @@ def main():
parser.error(e)
if not os.path.isfile(args.inputFile):
- print 'ERROR: the provided input file \'%s\' is non existent' % args.inputFile
+ print('ERROR: the provided input file \'%s\' is non existent' % args.inputFile)
sys.exit(1)
if not args.decrypt:
diff --git a/extra/dbgtool/dbgtool.py b/extra/dbgtool/dbgtool.py
index 9a27a60b4..1f5ff92ef 100644
--- a/extra/dbgtool/dbgtool.py
+++ b/extra/dbgtool/dbgtool.py
@@ -19,7 +19,7 @@ def convert(inputFile):
fileSize = fileStat.st_size
if fileSize > 65280:
- print "ERROR: the provided input file '%s' is too big for debug.exe" % inputFile
+ print("ERROR: the provided input file '%s' is too big for debug.exe" % inputFile)
sys.exit(1)
script = "n %s\nr cx\n" % os.path.basename(inputFile.replace(".", "_"))
@@ -59,7 +59,7 @@ def convert(inputFile):
def main(inputFile, outputFile):
if not os.path.isfile(inputFile):
- print "ERROR: the provided input file '%s' is not a regular file" % inputFile
+ print("ERROR: the provided input file '%s' is not a regular file" % inputFile)
sys.exit(1)
script = convert(inputFile)
@@ -70,7 +70,7 @@ def main(inputFile, outputFile):
sys.stdout.write(script)
sys.stdout.close()
else:
- print script
+ print(script)
if __name__ == "__main__":
usage = "%s -i [-o