"""Recursive FTP scanners"""
+from __future__ import print_function
import ftplib
from m_lib.net.ftp.ftpparse import ftpparse
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')
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)