[Perl Tk] Whois Client 0.2

Iniciado por BigBear, Marzo 31, 2012, 10:31:37 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Marzo 31, 2012, 10:31:37 PM Ultima modificación: Marzo 14, 2015, 10:18:08 AM por Expermicid
La version mejorada de un cliente whois que hice hace un largooooooooo tiempo.

Para usarlo tienen que instalar el modulo necesario de la siguiente manera.

Código: php

ppm install http://www.bribes.org/perl/ppm/Net-Whois-Raw.ppd


Una imagen del programa


El codigo es

Código: perl

#!usr/bin/perl
#Whois Client 0.2
#Coded By Doddy H
#ppm install http://www.bribes.org/perl/ppm/Net-Whois-Raw.ppd

use Tk;
use Tk::ROText;
use Net::Whois::Raw;

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

my $color_fondo = "black";
my $color_texto = "cyan";

$yu =
  MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
$yu->title("Whois Client 0.2 || Coded By Doddy H");
$yu->geometry("400x350+20+20");
$yu->resizable( 0, 0 );

$yu->Label(
    -text       => "Page : ",
    -font       => "Impact",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 20, -y => 20 );
my $targe = $yu->Entry(
    -width      => 35,
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 70, -y => 26 );
$yu->Button(
    -text             => "Get Info",
    -width            => 10,
    -background       => $color_fondo,
    -foreground       => $color_texto,
    -activebackground => $color_texto,
    -command          => \&whoisit
)->place( -x => 290, -y => 24 );
$yu->Label(
    -text       => "Information",
    -font       => "Impact",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 140, -y => 85 );
my $data = $yu->Scrolled(
    "ROText",
    -width      => 40,
    -height     => 12,
    -scrollbars => "e",
    -background => $color_fondo,
    -foreground => $color_texto
)->place( -x => 45, -y => 150 );

sub whoisit {

    $data->delete( "0.1", "end" );
    $data->insert( "end", whois( $targe->get ) );

}

MainLoop;

#The End ?