Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.
user:hash:salt help?
use strict;
sub tchomp { #From the module Text::Chomp
my $text = shift;
$text =~ s/^(.*?)(?:\x0D\x0A|\x0A|\x0D|\x0C|\x{2028}|\x{2029})/$1/s;
return $text;
}
sub d{
print "#########################################################################
Database extractor
Arguments:
<database>\tDumped database
<prefix>\tPrefix of the table you\'re extracting from
<columns>\tNumbers of the columns you want, seperate by commas
<delimiter>\tWhat to split the resulting data by.
\t\tIf you want spaces then enclose with quotes
<resultfile>\tFile to dump the extracted data to\n
E.G.: DbCrackingKit.pl dump_gamers.sql e107_users 2,5 : gamerdump.txt
#########################################################################\n";
exit;
}
&d unless @ARGV==5;
my($db_database,$db_prefix,$db_columns,$db_delim,$db_dump,@db_full,@db_columns,@db_columndata,$line,$d,$x,$realnum) = (@ARGV);
@db_columns = split(/,/,$db_columns);
print "Db: $db_database\nPrefix: $db_prefix\nColumns: $db_columns\nDelimiter: $db_delim\nResult: $db_dump\n";
print "[+] Just wait, loading $db_database\n";
open("xfile", "<$db_database") || die "Couldn\'t open $db_database\n";
@db_full = <xfile>;
close("xfile");
print "...finished\n";
foreach $line(@db_full){
$line = &tchomp($line);
if($line =~ s/INSERT INTO (\'|\`|)$db_prefix(\'|\`|)(.+)/INSERT INTO \`$db_prefix\`$3/i){
@db_columndata = split(/\'/,$line);
$d=1;
open(DBLOG,">>$db_dump") || die "[-] Couldn't open $db_dump\n";
for($x=0;$x<=$#db_columns;$x++){
$realnum = $db_columns[$x]*2-1;
if($x==$#db_columns){
print "$db_columndata[$realnum]\n";
print DBLOG "$db_columndata[$realnum]\n";
}
else{
print "$db_columndata[$realnum]$db_delim";
print DBLOG "$db_columndata[$realnum]$db_delim";
}
}
}
}
close(DBLOG);
if($d){
print "[+] Parsing & dumping completed\n";
}
else{
print "[-] No data was extracted\n";
}```
Its in perl, I didnt write it, I dont know the source.