X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_lib%2Fnet%2Fftp%2Fftpscan.py;h=5eeb1d2be4a813baad7fa0a6eed4f619c1200b30;hb=fb3af94919a9ee18ba1c35f927f19837f057fa1f;hp=319660be9d2147c8090f86dd69dd1daa32b9cfe6;hpb=9a523766e02fc3c5d1df4550385a604dca8e6e80;p=m_lib.git diff --git a/m_lib/net/ftp/ftpscan.py b/m_lib/net/ftp/ftpscan.py index 319660b..5eeb1d2 100755 --- a/m_lib/net/ftp/ftpscan.py +++ b/m_lib/net/ftp/ftpscan.py @@ -2,6 +2,7 @@ """Recursive FTP scanners""" +from __future__ import print_function import ftplib from m_lib.net.ftp.ftpparse import ftpparse @@ -217,7 +218,7 @@ def test(ftp_server, func, passive=None, reconnect=False): tree = func(ftp_server, passive=passive, reconnect=reconnect) stop_time = time() - print stop_time - start_time + print(stop_time - start_time) logfname = "%s.list" % ftp_server log = open(logfname, 'w') @@ -268,16 +269,16 @@ if __name__ == "__main__": else: ftp_server = arguments[0] - print "Scanning", ftp_server + print("Scanning", ftp_server) try: test(ftp_server, ftpscanrecursive, passive) except FtpScanError, msg: - print "Rescanning due to the error:", msg + print("Rescanning due to the error:", msg) try: test(ftp_server, ftpscan1, passive) except EOFError: - print "Rescanning due to the error: connection reset by peer" + print("Rescanning due to the error: connection reset by peer") test(ftp_server, ftpscan1, passive, True) except EOFError: - print "Rescanning due to the error: connection reset by peer" + print("Rescanning due to the error: connection reset by peer") test(ftp_server, ftpscan1, passive, True)