Hack x Crack - Comunidad de Seguridad informática

Programación => Scripting => Perl => Mensaje iniciado por: BigBear en Mayo 27, 2011, 03:38:18 am

Título: [Perl Tk] Fast Scan Port 0.3
Publicado por: BigBear en Mayo 27, 2011, 03:38:18 am

Un scanner bien rapido en perl , solo es rapido en linux xDDDDDD

Una imagen en mi glorioso ubuntu

(http://doddyhackman.webcindario.com/images/scanport.png)


Código: [Seleccionar]
#!usr/bin/perl
#Fast Scan Port 0.3
#(c) Doddy Hackman 2011
#Tested on Ubuntu 10.04

use Tk;
use Tk::ROText;
use IO::Socket;

my $new = MainWindow->new();

$new->title("Fast Scan Port 0.3");
$new->geometry("240x400+20+20");
$new->resizable(0,0);

$new->Label(-text=>"Target : ",-font=>"Impact1")->place(-y=>20,-x=>20);
my $target = $new->Entry(-width=>20,-text=>"localhost")->place(-y=>24,-x=>85);
$new->Label(-text=>"Port : ",-font=>"Impact1")->place(-x=>20,-y=>50);
my $par = $new->Entry(-width=>10,-text=>"1-9999")->place(-y=>53,-x=>70);

$new->Label(-text=>"Output",-font=>"Impact1")->place(-x=>90,-y=>90);
my $console = $new->ROText(-height=>14,-width=>28)->place(-y=>130,-x=>20);

$new->Button(-text=>"Scan Now",-command=>\&scan,-width=>20)->place(-y=>350,-x=>50);

MainLoop;

sub scan {

my $ip = $target->get;
my $verbien = $par->get;

if ($verbien=~/(.*)-(.*)/) {

my $start = $1;
my $end = $2;

$console->delete("0.0","end");
$console->insert("end","\n[+] Target : ".$ip."\n");
$console->insert("end","[+] Port : $verbien\n\n");

for my $port($start..$end) {
$new->update;
if (new IO::Socket::INET(Timeout=>0.5,PeerAddr => $ip,PeerPort => $port,Proto => "tcp",Timeout  => 0.5)) {
$console->insert("end","[+] Port Found : ".$port."\n");
}}
$console->insert("end","\n\n[+] Scan Finished\n\n");
}}

# ¿ The End ?