|
261
|
Programación / Scripting / [Python] Whois Online 0.1
|
en: 23 Abril 2012, 17:20 pm
|
Un simple script en Python para realizar un whois de forma online (mediante una pagina). #!usr/bin/python #Whois Online 0.1 #Coded By Doddy H import urllib2,sys,re nave = urllib2.build_opener() 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')] def tomar(web,vars) : return nave.open(web,vars).read() def head(): print "\n-- == Whois Online 0.1 == --\n\n" def copyright(): print "\n(C) Doddy Hackman 2012\n" sys.exit(1) def sintax(): print "[+] Sintax : ",sys.argv[0]," <domain>\n" def whois(domain): try: code = tomar("http://networking.ringofsaturn.com/Tools/whois.php","domain="+domain+"&"+"submit=submit") if (re.findall("<PRE>(.*?)<\/PRE>",code,re.S)): found = re.findall("<PRE>(.*?)<\/PRE>",code,re.S) resul = found[0] resul = re.sub(""","",resul) resul = re.sub(">>>","",resul) resul = re.sub("<<<","",resul) return resul else: return "Not Found" except: print "[-] Page offline\n" head() if len(sys.argv) != 2 : sintax() else : print whois(sys.argv[1]) copyright() # The End
|
|
|
262
|
Programación / Scripting / [Ruby] Whois Online 0.1
|
en: 23 Abril 2012, 17:19 pm
|
Un simple script en Ruby para hacer un whois al dominio que quieran. #!usr/bin/ruby #Whois Online 0.1 #Coded BY Doddy H require "net/http" def head() print "\n-- == Whois Online 0.1 == --\n\n" end def sintax() print "\n[+] Sintax : ruby domain.rb <domain>\n" end def copyright() print "\n\n(C) Doddy Hackman 2012\n\n" end def tomar(web,par) return Net::HTTP.post_form(URI.parse(web),par).body end def whois(dom) code = tomar("http://networking.ringofsaturn.com/Tools/whois.php",{"domain"=>dom,"submit"=>"submit"}) if code=~/<pre>(.*?)<\/pre>/mi final = $1 final = final.sub(/"/,"") final = final.sub(/>>>/,"") final = final.sub(/<<</,"") return final else return "Not Found" end end domain = ARGV[0] head() if !domain sintax() else print whois(domain) end copyright() #The End ?
|
|
|
263
|
Programación / Scripting / [Perl Tk] FTP Manager 0.2
|
en: 22 Abril 2012, 05:03 am
|
Version Tk de un cliente FTP que hice en Perl Las opciones que tiene son - Listado de archivos en un directorio
- Borrar archivos y directorios
- Crear directorios nuevos
- Renombrar
- Descargar y subir archivos
Una imagen El codigo del programa #!usr/bin/perl #FTP Manager 0.2 #Version Tk #Coded By Doddy H use Tk; use Tk::FileSelect; use Cwd; use Net::FTP; if ( $^O eq 'MSWin32' ) { use Win32::Console; Win32::Console::Free(); } my $color_fondo = "black"; my $color_texto = "cyan"; my $navedos = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $navedos->title("FTP Manager 0.2"); $navedos->geometry("218x150+20+20"); $navedos->resizable( 0, 0 ); $navedos->Label( -text => "Host : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 10, -y => 10 ); my $host = $navedos->Entry( -width => 23, -text => "localhost", -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 13 ); $navedos->Label( -text => "User : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 10, -y => 40 ); my $user = $navedos->Entry( -width => 23, -text => "doddy", -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 43 ); $navedos->Label( -text => "Pass : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 10, -y => 70 ); my $pass = $navedos->Entry( -width => 23, -text => "doddy", -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 73 ); $navedos->Button( -text => "Connect", -width => 13, -command => \&now, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 60, -y => 110 ); MainLoop; sub now { my $host = $host->get; my $user = $user->get; my $pass = $pass->get; my $socket = Net::FTP->new($host); if ( $socket->login( $user, $pass ) ) { $navedos->destroy; my $mandos = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $mandos->title("FTP Manager 0.2 || Coded By Doddy H"); $mandos->geometry("565x335+20+20"); $mandos->resizable( 0, 0 ); $menul = $mandos->Frame( -relief => "sunken", -bd => 1, -background => $color_fondo, -foreground => $color_texto ); my $menulnow = $menul->Menubutton( -text => "Options", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); my $aboutnow = $menul->Menubutton( -text => "About", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); my $exitnow = $menul->Menubutton( -text => "Exit", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); $menul->pack( -side => "top", -fill => "x" ); $menulnow->command( -label => "Delete File", -background => $color_fondo, -foreground => $color_texto, -command => \&delnow ); $menulnow->command( -label => "Delete Directory", -background => $color_fondo, -foreground => $color_texto, -command => \&deldirnow ); $menulnow->command( -label => "Make Directory", -background => $color_fondo, -foreground => $color_texto, -command => \&makedirnow ); $menulnow->command( -label => "Rename", -background => $color_fondo, -foreground => $color_texto, -command => \&renamenow ); $menulnow->command( -label => "Download", -background => $color_fondo, -foreground => $color_texto, -command => \&downloadnow ); $menulnow->command( -label => "Upload", -background => $color_fondo, -foreground => $color_texto, -command => \&updatenow ); $aboutnow->command( -label => "About", -background => $color_fondo, -foreground => $color_texto, -command => \&aboutnownow ); $exitnow->command( -label => "Exit", -background => $color_fondo, -foreground => $color_texto, -command => \&exitnow ); $mandos->Label( -text => "Directory : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 23, -y => 40 ); my $actual = $mandos->Entry( -text => "/", -width => 60, -background => $color_fondo, -foreground => $color_texto )->place( -x => 105, -y => 43 ); $mandos->Button( -width => 8, -text => "Enter", -command => \&dirs, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 480, -y => 43 ); $mandos->Label( -text => "Directory", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 130, -y => 90 ); $mandos->Label( -text => "Files", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 350, -y => 90 ); my $dir_now = $mandos->Listbox( -width => 25, -height => 13, -background => $color_fondo, -foreground => $color_texto )->place( -x => 88, -y => 130 ); my $files_now = $mandos->Listbox( -width => 25, -height => 13, -background => $color_fondo, -foreground => $color_texto )->place( -x => 300, -y => 130 ); sub exitnow { $socket->close(); } sub aboutnownow { $mandos->Dialog( -title => "About", -buttons => ["OK"], -text => "Coded By Doddy H", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } sub dirs { $dir_now->delete( "0.0", "end" ); $files_now->delete( "0.0", "end" ); if ( my @files = $socket->dir() ) { my @files_found; my @dirs_found; $socket->cwd( $actual->get ); for my $fil (@files) { my @to = split( " ", $fil ); my ( $dir, $file ) = @to[ 0, 8 ]; if ( $dir =~ /^d/ ) { $dir_now->insert( "end", $file ); } else { $files_now->insert( "end", $file ); } } } } sub delnow { my $ventdos = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $ventdos->geometry("260x80+20+20"); $ventdos->title("Delete File"); $ventdos->resizable( 0, 0 ); $ventdos->Label( -text => "File : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -x => 20, -y => 20 ); my $filechau = $ventdos->Entry( -width => 20, -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 26 ); $ventdos->Button( -width => 6, -text => "Delete", -command => \&delnowdos, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 190, -y => 25 ); sub delnowdos { if ( $socket->delete( $filechau->get ) ) { $mandos->Dialog( -title => "Deleted", -buttons => ["OK"], -text => "File Deleted", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } else { $mandos->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } } sub deldirnow { my $venttres = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $venttres->geometry("300x80+20+20"); $venttres->title("Delete Directory"); $venttres->resizable( 0, 0 ); $venttres->Label( -text => "Directory : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -x => 20, -y => 20 ); my $dirchau = $venttres->Entry( -width => 20, -background => $color_fondo, -foreground => $color_texto )->place( -x => 99, -y => 26 ); $venttres->Button( -width => 6, -text => "Delete", -command => \&deldirnowdos, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 230, -y => 25 ); sub deldirnowdos { if ( $socket->rmdir( $dirchau->get ) ) { $mandos->Dialog( -title => "Deleted", -buttons => ["OK"], -text => "Directory Deleted", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } else { $mandos->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } } sub makedirnow { my $ventcuatro = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $ventcuatro->geometry("300x80+20+20"); $ventcuatro->title("Make Directory"); $ventcuatro->resizable( 0, 0 ); $ventcuatro->Label( -text => "Directory : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -x => 20, -y => 20 ); my $dirnow = $ventcuatro->Entry( -width => 20, -background => $color_fondo, -foreground => $color_texto )->place( -x => 99, -y => 26 ); $ventcuatro->Button( -width => 6, -text => "Make", -command => \&makedirnowdos, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 230, -y => 25 ); sub makedirnowdos { if ( $socket->mkdir( $dirnow->get ) ) { $mandos->Dialog( -title => "Ok", -buttons => ["OK"], -text => "Ok", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } else { $mandos->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } } sub renamenow { my $ventcinco = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $ventcinco->geometry("440x80+20+20"); $ventcinco->title("Rename"); $ventcinco->resizable( 0, 0 ); $ventcinco->Label( -text => "Name : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -x => 20, -y => 20 ); my $unonow = $ventcinco->Entry( -width => 20, -background => $color_fondo, -foreground => $color_texto )->place( -x => 74, -y => 26 ); $ventcinco->Label( -text => "To : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -x => 210, -y => 20 ); my $dosnow = $ventcinco->Entry( -background => $color_fondo, -foreground => $color_texto )->place( -x => 240, -y => 26 ); $ventcinco->Button( -width => 6, -text => "Rename", -command => \&renamenowdos, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 372, -y => 26 ); sub renamenowdos { if ( $socket->rename( $unonow->get, $dosnow->get ) ) { $mandos->Dialog( -title => "Ok", -buttons => ["OK"], -text => "Ok", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } else { $mandos->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } } sub updatenow { my $ventseis = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $ventseis->geometry("440x80+20+20"); $ventseis->title("Upload"); $ventseis->resizable( 0, 0 ); $ventseis->Label( -text => "File : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -x => 20, -y => 20 ); my $filenow = $ventseis->Entry( -width => 40, -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 26 ); $ventseis->Button( -width => 8, -text => "Browse", -command => \&bronow, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 310, -y => 26 ); $ventseis->Button( -width => 8, -text => "Upload", -command => \&updatenowdos, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 365, -y => 26 ); sub bronow { $browse = $ventseis->FileSelect( -directory => getcwd() ); my $file = $browse->Show; $filenow->configure( -text => $file ); } sub updatenowdos { if ( $socket->put( $filenow->get ) ) { $mandos->Dialog( -title => "File uploaded", -buttons => ["OK"], -text => "Ok", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } else { $mandos->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } } sub downloadnow { my $ventsiete = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $ventsiete->geometry("270x80+20+20"); $ventsiete->title("Downloader"); $ventsiete->resizable( 0, 0 ); $ventsiete->Label( -text => "File : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto )->place( -x => 20, -y => 20 ); my $filenownow = $ventsiete->Entry( -width => 20, -background => $color_fondo, -foreground => $color_texto )->place( -x => 59, -y => 26 ); $ventsiete->Button( -width => 8, -text => "Download", -command => \&downloadnowdos, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->place( -x => 190, -y => 25 ); sub downloadnowdos { if ( $socket->get( $filenownow->get ) ) { $mandos->Dialog( -title => "File downloaded", -buttons => ["OK"], -text => "Ok", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } else { $mandos->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } } } else { $mandos->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } #The End ?
|
|
|
264
|
Programación / Scripting / [Perl] FTP Manager 0.2
|
en: 22 Abril 2012, 05:03 am
|
Nueva version de un cliente FTP que hice en Perl , en esta version se le arreglo varias cosas. El codigo #!usr/bin/perl #FTP Manager 0.2 #Coded By Doddy H use Net::FTP; &head; print "\n\n[FTP Server] : "; chomp( my $ftp = <stdin> ); chomp( my $user = <stdin> ); chomp( my $pass = <stdin> ); if ( my $socket = Net::FTP->new($ftp) ) { if ( $socket->login( $user, $pass ) ) { print "\n\n[+] Enter of the server FTP\n"; menu: chomp( my $cmd = <stdin> ); if ( $cmd =~ /help/ ) { [+] Commands [++] help : show information [++] cd : change directory <dir> [++] dir : list a directory [++] mkdir : create a directory <dir> [++] pwd : directory [++] del : delete a file <file> [++] rename : change name of the a file <file1> <file2> [++] size : size of the a file <file> [++] put : upload a file <file> [++] get : download a file <file> [++] cdup : change dir <dir> ); } if ( $cmd eq "dir" ) { if ( my @files = $socket->dir() ) { my @files_found; my @dirs_found; for my $fil (@files) { my @to = split( " ", $fil ); my ( $dir, $file ) = @to[ 0, 8 ]; if ( $dir =~ /^d/ ) { push( @dirs_found, $file ); } else { push( @files_found, $file ); } } print "[++] Directory Found : " . int(@dirs_found) . "\n"; print "\n[+] Files Found : " . int(@files_found) . "\n\n"; for my $dires (@dirs_found) { } for my $filex (@files_found) { } } else { } } if ( $cmd =~ /pwd/ig ) { print "[+] Path : " . $socket->pwd() . "\n"; } if ( $cmd =~ /cd (.*)/ig ) { if ( $socket->cwd($1) ) { print "[+] Directory changed\n"; } else { } } if ( $cmd =~ /cdup/ig ) { if ( my $dir = $socket->cdup() ) { print "[+] Directory changed\n\n"; } else { } } if ( $cmd =~ /del (.*)/ig ) { if ( $socket->delete($1) ) { print "[+] File deleted\n"; } else { } } if ( $cmd =~ /rename (.*) (.*)/ig ) { if ( $socket->rename( $1, $2 ) ) { print "[+] File Updated\n"; } else { } } if ( $cmd =~ /mkdir (.*)/ig ) { if ( $socket->mkdir($1) ) { print "[+] Directory created\n"; } else { } } if ( $cmd =~ /rmdir (.*)/ig ) { if ( $socket->rmdir($1) ) { print "[+] Directory deleted\n"; } else { } } if ( $cmd =~ /size (.*)/ig ) { print "[+] Size : " . $socket->size($1) . "\n\n"; } if ( $cmd =~ /exit/ig ) { copyright(); } if ( $cmd =~ /get (.*)/ig ) { print "[+] Downloading file\n\n"; if ( $socket->get($1) ) { print "[+] Download completed"; } else { } } if ( $cmd =~ /put (.*)/ig ) { print "[+] Uploading file\n\n"; if ( $socket->put($1) ) { print "[+] Upload completed"; } else { } } } else { print "\n\n[-] Failed the login\n\n"; } } else { print "\n\n[-] Error\n\n"; } sub head { print "\n\n -- == FTP Manager 0.2 == --\n\n"; } sub copyright { print "\n\n(C) Doddy Hackman 2012\n\n"; } # The End ?
|
|
|
265
|
Programación / Scripting / [Perl Tk] Mysql Manager 0.6
|
en: 14 Abril 2012, 19:49 pm
|
Nueva version Tk de un Mysql manager que hice hace tiempo. #!usr/bin/perl #Mysql Manager 0.6 #Version Tk #Coded By Doddy H #Modules #ppm install http://www.bribes.org/perl/ppm/Scalar-List-Utils.ppd #ppm install http://www.bribes.org/perl/ppm/Storable.ppd #ppm install http://www.bribes.org/perl/ppm/DBI.ppd #ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-mysql.ppd use Tk; use Tk::ROText; use Tk::PNG; use DBI; if ( $^O eq 'MSWin32' ) { use Win32::Console; Win32::Console::Free(); } my $color_fondo = "black"; my $color_texto = "orange"; my $nave = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $nave->title("Mysql Manager 0.6 || Coded By Doddy H"); $nave->geometry("210x160+20+20"); $nave->resizable( 0, 0 ); $nave->Label( -text => "Host : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 10, -y => 10 ); my $host = $nave->Entry( -width => 22, -text => "localhost", -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 13 ); $nave->Label( -text => "User : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 10, -y => 40 ); my $user = $nave->Entry( -width => 22, -text => "root", -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 43 ); $nave->Label( -text => "Pass : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 10, -y => 70 ); my $pass = $nave->Entry( -width => 22, -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 73 ); $nave->Button( -text => "Connect", -width => 13, -command => \&now, -background => $color_fondo, -foreground => $color_texto, -activebackground => "orange" )->place( -x => 60, -y => 120 ); MainLoop; sub now { my $host = $host->get; my $user = $user->get; my $pass = $pass->get; $info = "dbi:mysql::" . $host . ":3306"; if ( my $enter = DBI->connect( $info, $user, $pass, { PrintError => 0 } ) ) { $nave->destroy; my $man = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $man->title("Mysql Manager 0.6 || Coded By Doddy H"); $man->geometry("650x320+20+20"); $man->resizable( 0, 0 ); $man->Label( -text => "Query : ", -font => "Impact1", -background => $color_fondo, -foreground => $color_texto )->place( -x => 73, -y => 20 ); my $ac = $man->Entry( -width => 60, -background => $color_fondo, -foreground => $color_texto )->place( -x => 135, -y => 23 ); $man->Button( -width => 8, -text => "Execute", -command => \&tes, -background => $color_fondo, -foreground => $color_texto, -activebackground => "orange" )->place( -x => 510, -y => 23 ); my $out = $man->Scrolled( "ROText", -width => 74, -height => 15, -background => $color_fondo, -foreground => $color_texto )->place( -x => 60, -y => 73 ); $man->bind( "<Key-Return>" => sub { &tes } ); sub tes { my $ac = $ac->get; $re = $enter->prepare($ac); $re->execute(); my $total = $re->rows(); my @columnas = @{ $re->{NAME} }; if ( $total eq "-1" ) { $out->insert( "end", "\n[-] Query Error\n" ); next; } else { $out->insert( "end", "\n[+] Result of the query\n" ); if ( $total eq 0 ) { $out->insert( "end", "\n[+] Not rows returned\n\n" ); } else { $out->insert( "end", "\n[+] Rows returned : " . $total . "\n\n" ); for (@columnas) { $out->insert( "end", $_ . "\t" ); } $out->insert( "end", "\n\n" ); while ( @row = $re->fetchrow_array ) { for (@row) { $out->insert( "end", $_ . "\t" ); } $out->insert( "end", "\n" ); } } } } } else { $man->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } # ¿ The End ?
|
|
|
266
|
Programación / Scripting / [Perl] Mysql Manager 0.5
|
en: 14 Abril 2012, 19:49 pm
|
Nueva version de un mysql manager que hice hace un largo tiempo. #!usr/bin/perl #Mysql Manager 0.5 #Coded By Doddy H #Modules #ppm install http://www.bribes.org/perl/ppm/Scalar-List-Utils.ppd #ppm install http://www.bribes.org/perl/ppm/Storable.ppd #ppm install http://www.bribes.org/perl/ppm/DBI.ppd #ppm install http://theoryx5.uwinnipeg.ca/ppms/DBD-mysql.ppd use DBI; sub head { print "\n\n -- == Mysql Manager 0.5 == --\n\n"; } sub copyright { print "\n\n-- == (C) Doddy Hackman 2012 == --\n\n"; } sub sintax { print "\n[+] Sintax : $0 <host> <user> <pass>\n"; } head(); unless ( @ARGV > 2 ) { sintax(); } else { enter( $ARGV[0], $ARGV[1], $ARGV[2] ); } copyright(); sub enter { print "\n[+] Connecting to the server\n"; $info = "dbi:mysql::" . $_[0] . ":3306"; if ( my $enter = DBI->connect( $info, $_[1], $_[2], { PrintError => 0 } ) ) { print "\n[+] Enter in the database"; while (1) { print "\n\n\n[+] Query : "; chomp( my $ac = <stdin> ); if ( $ac eq "exit" ) { $enter->disconnect; print "\n\n[+] Closing connection\n\n"; copyright(); } $re = $enter->prepare($ac); $re->execute(); my $total = $re->rows(); my @columnas = @{ $re->{NAME} }; if ( $total eq "-1" ) { print "\n\n[-] Query Error\n"; next; } else { print "\n\n[+] Result of the query\n"; if ( $total eq 0 ) { print "\n\n[+] Not rows returned\n\n"; } else { print "\n\n[+] Rows returned : " . $total . "\n\n\n"; for (@columnas) { } while ( @row = $re->fetchrow_array ) { for (@row) { } } } } } } else { print "\n[-] Error connecting\n"; } } # ¿ The End ?
|
|
|
267
|
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 ?
|
|
|
268
|
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 ?
|
|
|
269
|
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 ?
|
|
|
270
|
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
|
|
|
|
|
|
|