Bienvenido a Tecnohackers

Tecnohackers » Programacion » Area de Programacion » Scripting. VBS, Batch, Bash, JavaSript.
 » 

[Perl] Buscador de sueños 0.1



Autor Tema: [Perl] Buscador de sueños 0.1  (Leído 738 veces)

Desconectado Doddy

  • Veterano
  • ***
  • Mensajes: 249
  • Slow Mind
[Perl] Buscador de sueños 0.1
« en: Abril 04, 2012, 06:36:46 pm »
Un simple buscador de sueños en Perl.

Código: You are not allowed to view links. Register or Login
#!usr/bin/perl
#Buscador de sueños 0.1
#Coded By Doddy H

use LWP::UserAgent;

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

header();

print "\n[+] Palabra : ";
chomp( my $string = <stdin> );

my $code =
  toma( "http://www.mis-suenos.org/interpretaciones/buscar?text=" . $string );

if ( $code =~ /<li>(.*)<\/li>/ ) {
    my $si = $1;
    if ( $si eq " " ) {
        print "\n\n[-] No se encontro\n";
    }
    else {
        print "\n\n[+] Significado : $si\n";
    }
}

copyright();

sub header {
    print "\n\n-- == Buscador de sueños == --\n\n";
}

sub copyright {
    print "\n\n(C) Doddy Hackman 2012\n\n";
    <stdin>;
    exit(1);
}

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

#The End ?
You are not allowed to view links. Register or Login

Tags:
Tags:

 


SMF 2.0.19 | SMF © 2016, Simple Machines
Paginas Afiliadas
Twitter - FaceBook - Daraxblog
Designed by Smf Personal