|
351
|
Programación / Scripting / [Perl Tk] Finder Paths 0.7
|
en: 8 Abril 2012, 01:56 am
|
Un simple programa para buscar los listados de directorios en una pagina. Una imagen El codigo #!usr/bin/perl #Finder Paths 0.7 #Version Tk #Coded By Doddy H use Tk; use Tk::ListBox; use LWP::UserAgent; use URI ::Split qw(uri_split ); use HTML::LinkExtor; if ( $^O eq 'MSWin32' ) { use Win32::Console; Win32::Console::Free(); } my $background_fondo = "black"; my $texto_color = "cyan"; 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" ); $ha = MainWindow->new( -background => $background_fondo, -foreground => $texto_color ); $ha->title("Finder Paths 0.7 || (C) Doddy Hackman 2012"); $ha->geometry("510x430+20+20"); $ha->resizable( 0, 0 ); $ha->Label( -text => "Web : ", -font => "Impact1", -background => $background_fondo, -foreground => $texto_color )->place( -x => 30, -y => 20 ); my $pagine = $ha->Entry( -text => "http://localhost:8080/paths", -width => 40, -background => $background_fondo, -foreground => $texto_color )->place( -x => 80, -y => 23 ); $ha->Button( -text => "Search", -width => 10, -command => \&search, -background => $background_fondo, -foreground => $texto_color, -activebackground => $texto_color )->place( -x => 330, -y => 23 ); $ha->Button( -text => "Logs", -width => 10, -command => \&ver_logs, -background => $background_fondo, -foreground => $texto_color, -activebackground => $texto_color )->place( -x => 405, -y => 23 ); $ha->Label( -text => "Type : ", -font => "Impact1", -background => $background_fondo, -foreground => $texto_color )->place( -x => 30, -y => 55 ); $ha->Radiobutton( -text => "Fast", -value => "fast", -variable => \$type, -background => $background_fondo, -foreground => $texto_color, -activebackground => $texto_color )->place( -x => 80, -y => 57 ); $ha->Radiobutton( -text => "Full", -value => "full", -variable => \$type, -background => $background_fondo, -foreground => $texto_color, -activebackground => $texto_color )->place( -x => 125, -y => 57 ); $ha->Label( -text => "Paths Found", -font => "Impact", -background => $background_fondo, -foreground => $texto_color )->place( -x => 200, -y => 110 ); my $paths_list = $ha->Listbox( -width => 70, -height => 13, -background => $background_fondo, -foreground => $texto_color )->place( -x => 42, -y => 160 ); my $status_now = $ha->Label( -text => "Status : <None>", -font => "Impact", -background => $background_fondo, -foreground => $texto_color )->place( -x => 190, -y => 380 ); MainLoop; sub search { $paths_list->delete( "0.0", "end" ); $status_now->configure( -text => "Status : Scanning" ); if ( $type eq "fast" ) { simple( $pagine->get ); } if ( $type eq "full" ) { escalar( $pagine->get ); } $status_now->configure( -text => "Status : <None>" ); } sub ver_logs { if ( -f "paths-logs.txt" ) { } else { $ha->Dialog( -title => "Error", -buttons => ["OK"], -text => "File Not Found", -background => $background_fondo, -foreground => $texto_color, -activebackground => $texto_color )->Show(); } } sub escalar { my $co = $_[0]; my $code = toma( $_[0] ); my @links = get_links($code); if ( $code =~ /Index of (.*)/ig ) { $paths_list->insert( "end", $co ); savefile( "paths-logs.txt", $co ); my $dir_found = $1; while ( $code =~ /<a href=\"(.*)\">(.*)<\/a>/ig ) { my $ruta = $1; my $nombre = $2; unless ( $nombre =~ /Parent Directory/ig or $nombre =~ /Description/ig ) { push( @encontrados, $_[0] . "/" . $nombre ); } } } for my $com (@links) { $ha->update; my ( $scheme, $auth, $path, $query, $frag ) = uri_split( $_[0] ); if ( $path =~ /\/(.*)$/ ) { my $path1 = $1; $_[0] =~ s/$path1//ig; my ( $scheme, $auth, $path, $query, $frag ) = uri_split($com); if ( $path =~ /(.*)\// ) { my $parche = $1; unless ( $repetidos =~ /$parche/ ) { $repetidos .= " " . $parche; my $yeah = "http://" . $auth . $parche; escalar($yeah); } } for (@encontrados) { $ha->update; escalar($_); } } } } sub simple { my $code = toma( $_[0] ); my @links = get_links($code); for my $com (@links) { $ha->update; my ( $scheme, $auth, $path, $query, $frag ) = uri_split( $_[0] ); if ( $path =~ /\/(.*)$/ ) { my $path1 = $1; $_[0] =~ s/$path1//ig; my ( $scheme, $auth, $path, $query, $frag ) = uri_split($com); if ( $path =~ /(.*)\// ) { my $parche = $1; unless ( $repetidos =~ /$parche/ ) { $repetidos .= " " . $parche; my $code = toma( "http://" . $auth . $parche ); if ( $code =~ /Index of (.*)</ig ) { my $dir_found = $1; my $yeah = "http://" . $auth . $parche; $paths_list->insert( "end", $yeah ); savefile( "paths-logs.txt", $yeah ); } } } } } } sub toma { return $nave->get( $_[0] )->content; } sub get_links { $test = HTML::LinkExtor->new( \&agarrar )->parse( $_[0] ); sub agarrar { my ( $a, %b ) = @_; } } sub savefile { open( SAVE , ">>" . $_[0] ); } #The End ?
|
|
|
352
|
Programación / Scripting / [Perl] Finder Paths 0.6
|
en: 8 Abril 2012, 01:55 am
|
Un simple script para buscar los famosos listados de directorios en una pagina. #!usr/bin/perl #Finder Paths 0.6 #Coded By Doddy H use LWP::UserAgent; use URI ::Split qw(uri_split ); use HTML::LinkExtor; 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" ); head(); chomp( my $web = <stdin> ); print "\n\n[+] Scan Type\n\n"; print "\n\n[+] Option : "; chomp( my $op = <stdin> ); print "\n\n[+] Scanning ....\n\n\n"; if ( $op eq "1" ) { simple($web); } elsif ( $op eq "2" ) { escalar($web); } else { simple($web); } copyright(); sub escalar { my $co = $_[0]; my $code = toma( $_[0] ); my @links = get_links($code); if ( $code =~ /Index of (.*)/ig ) { print "[+] Link : $co\n"; savefile( "paths-logs.txt", $co ); my $dir_found = $1; while ( $code =~ /<a href=\"(.*)\">(.*)<\/a>/ig ) { my $ruta = $1; my $nombre = $2; unless ( $nombre =~ /Parent Directory/ig or $nombre =~ /Description/ig ) { push( @encontrados, $_[0] . "/" . $nombre ); } } } for my $com (@links) { my ( $scheme, $auth, $path, $query, $frag ) = uri_split( $_[0] ); if ( $path =~ /\/(.*)$/ ) { my $path1 = $1; $_[0] =~ s/$path1//ig; my ( $scheme, $auth, $path, $query, $frag ) = uri_split($com); if ( $path =~ /(.*)\// ) { my $parche = $1; unless ( $repetidos =~ /$parche/ ) { $repetidos .= " " . $parche; my $yeah = "http://" . $auth . $parche; escalar($yeah); } } for (@encontrados) { escalar($_); } } } } sub simple { my $code = toma( $_[0] ); my @links = get_links($code); for my $com (@links) { my ( $scheme, $auth, $path, $query, $frag ) = uri_split( $_[0] ); if ( $path =~ /\/(.*)$/ ) { my $path1 = $1; $_[0] =~ s/$path1//ig; my ( $scheme, $auth, $path, $query, $frag ) = uri_split($com); if ( $path =~ /(.*)\// ) { my $parche = $1; unless ( $repetidos =~ /$parche/ ) { $repetidos .= " " . $parche; my $code = toma( "http://" . $auth . $parche ); if ( $code =~ /Index of (.*)</ig ) { my $dir_found = $1; my $yeah = "http://" . $auth . $parche; print "[+] Link : $yeah\n"; savefile( "paths-logs.txt", $yeah ); } } } } } } sub toma { return $nave->get( $_[0] )->content; } sub get_links { $test = HTML::LinkExtor->new( \&agarrar )->parse( $_[0] ); sub agarrar { my ( $a, %b ) = @_; } } sub savefile { open( SAVE , ">>" . $_[0] ); } sub head { @@@@@ @ @ @@@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@ @@@@ @@@ @@ @ @ @@@ @@ @ @@ @@ @@@@ @ @@ @ @ @ @ @ @ @@@@@ @ @ @@ @ @ @ @ @ @ @ @ @ @@@@@ @ @ @@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@@@ @@@ @ @ @@@@ @ @ @ @@ ); } sub copyright { print "\n\n(C) Doddy Hackman 2012\n\n"; <stdin>; } # The End ?
|
|
|
353
|
Programación / Scripting / Re: [Ruby] Buscador de sueños 0.1
|
en: 4 Abril 2012, 19:15 pm
|
parece que el problema solo esta en la version de ruby porque tu extraño sueño de "drogar y violar aliens xD" es encontrado como droga en las demas traducciones. parece que en la version de ruby solo se permite usar una palabra ej vibora porque sino da un error en el parseo del link , vere como se puede arreglar.
pd: hipotesis uno , cambiar la funcion toma() pd2 : que sera mas raro el script en si o soñar con "drogar y violar aliens" xDDD.
|
|
|
354
|
Programación / Scripting / [Perl] Buscador de sueños 0.1
|
en: 4 Abril 2012, 18:25 pm
|
Un simple buscador de sueños en Perl. #!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>; } sub toma { return $nave->get( $_[0] )->content; } #The End ?
|
|
|
355
|
Programación / Scripting / [Python] Buscador de sueños 0.1
|
en: 4 Abril 2012, 18:24 pm
|
Un simple buscador de sueños hecho en Python. #!usr/bin/python #coding: utf-8 #Buscador de sueños 0.1 #Coded By Doddy H import urllib2,re,sys def toma(web) : nave = urllib2.Request(web) nave.add_header('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5'); op = urllib2.build_opener() return op.open(nave).read() def head(): print "\n-- == Buscador de sueños == --\n" def copyright(): print "\n\n(C) Doddy Hackman 2012\n" raw_input() sys.exit(1) head() url = raw_input("\n\n[+] Texto : ") try: code = toma("http://www.mis-suenos.org/interpretaciones/buscar?text="+url) if (re.findall("<li>(.*)<\/li>",code)): re = re.findall("<li>(.*)<\/li>",code) re = re[0] if not re=="": print "\n\n[+] Significado : "+re else: print "[-] No se encontro significado\n" except: print "[-] Error\n" copyright() # The End
|
|
|
356
|
Programación / Scripting / [Ruby] Buscador de sueños 0.1
|
en: 4 Abril 2012, 18:24 pm
|
Un buscador de sueños en Ruby #!usr/bin/ruby #Buscador de sueños 0.1 #Coded By Doddy H require "net/http" def head() print "\n\n-- == Buscador de sueños == --\n\n" end def copyright() print "\n\n(C) Doddy Hackman 2012\n\n" gets.chomp exit(1) end def toma(web) return Net::HTTP.get_response(URI.parse(web)).body end head() print "\n[+] Texto : " string = gets.chomp url = "http://www.mis-suenos.org/interpretaciones/buscar?text="+string code = toma(url) if code=~/<li>(.*)<\/li>/ text = $1 if text == " " print "\n\n[-] No encontrado" else print "\n\n[+] Significado : "+text end end copyright() #The End ?
|
|
|
357
|
Programación / Scripting / [Perl Tk] Ping It 0.1
|
en: 1 Abril 2012, 03:20 am
|
Siempre habia querido hacer este programa en Perl , pero en ese entonces no tenia el tiempo al pedo necesario para hacerlo , que mejor que un sabado a la noche para hacerlo , claro que los sabados y domingo me los tomo como descanso ya que los dias de la semana estudio para unos examenes que se me vienen dentro de poco. Una imagen del programa El codigo #!usr/bin/perl #Ping It 0.1 #Version Tk #Coded By Doddy H use Tk; use Net::Ping; my $color_fondo = "black"; my $color_texto = "orange"; #if ( $^O eq 'MSWin32' ) { # use Win32::Console; # Win32::Console::Free(); #} my $sax = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $sax->title("Ping It 0.1 || Coded By Doddy H"); $sax->geometry("350x130+20+20"); $sax->resizable( 0, 0 ); $sax->Label( -text => "Host : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -y => 20, -x => 20 ); my $host = $sax->Entry( -width => 30, -background => $color_fondo, -foreground => $color_texto )->place( -y => 25, -x => 70 ); $sax->Button( -text => "Ping It", -width => 10, -command => \&pingita, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -y => 23, -x => 260 ); my $stat = $sax->Label( -text => "Status : <None>", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -y => 80, -x => 110 ); MainLoop; sub pingita { $clas = Net::Ping->new("icmp"); if ( $clas->ping( $host->get ) ) { $stat->configure( -text => "The host is alive" ); } else { $stat->configure( -text => "The host is offline" ); } } #The End ?
|
|
|
358
|
Programación / Scripting / [Perl Tk] Whois Client 0.2
|
en: 1 Abril 2012, 03:20 am
|
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. ppm install http://www.bribes.org/perl/ppm/Net-Whois-Raw.ppd
Una imagen del programa El codigo es #!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 ?
|
|
|
359
|
Programación / Scripting / [Perl Tk] Get IP 0.1
|
en: 1 Abril 2012, 02:04 am
|
Estaba muriendome de aburrimiento y me programe este pequeño programa en 5 minutos , que sirve para obtener la IP de un Host cualquiera. Una imagen El codigo #!usr/bin/perl #Get IP 0.1 #Version Tk #Coded By Doddy H use Tk; use IO::Socket; my $color_fondo = "black"; my $color_texto = "yellow"; #if ( $^O eq 'MSWin32' ) { # use Win32::Console; # Win32::Console::Free(); #} my $ua = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $ua->title("Get IP || Coded By Doddy H"); $ua->geometry("350x110+20+20"); $ua->resizable( 0, 0 ); $ua->Label( -text => "Host : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -y => 20, -x => 20 ); my $host = $ua->Entry( -width => 30, -background => $color_fondo, -foreground => $color_texto )->place( -y => 25, -x => 70 ); $ua->Button( -text => "Get IP", -width => 10, -command => \&quien, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -y => 23, -x => 260 ); $ua->Label( -text => "IP : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -y => 60, -x => 20 ); my $ip = $ua->Entry( -width => 33, -background => $color_fondo, -foreground => $color_texto )->place( -y => 65, -x => 52 ); MainLoop; sub quien { $ip->configure( -text => get_ip( $host->get ) ); } sub get_ip { } #The End ?
|
|
|
|
|
|
|