diff --git a/.gitignore b/.gitignore
index 81f587778..f14d2cafe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*.py[cod]
+*.sw[op]
output/
.sqlmap_history
traffic.txt
*~
-.idea/
\ No newline at end of file
+.idea/
diff --git a/extra/cloak/cloak.py b/extra/cloak/cloak.py
index cc95e5a99..d98f6d09d 100644
--- a/extra/cloak/cloak.py
+++ b/extra/cloak/cloak.py
@@ -7,6 +7,7 @@ Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
+from __future__ import print_function
import os
import sys
import zlib
@@ -38,7 +39,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 +64,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..3dc07a836 100644
--- a/extra/dbgtool/dbgtool.py
+++ b/extra/dbgtool/dbgtool.py
@@ -7,6 +7,7 @@ Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
+from __future__ import print_function
import os
import sys
import struct
@@ -19,7 +20,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 +60,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 +71,7 @@ def main(inputFile, outputFile):
sys.stdout.write(script)
sys.stdout.close()
else:
- print script
+ print(script)
if __name__ == "__main__":
usage = "%s -i [-o