elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl] Funcion getdrive()
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] Funcion getdrive()  (Leído 1,117 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] Funcion getdrive()
« en: 12 Octubre 2011, 16:44 pm »

Con esta funcion podran tener el tipo de disco que se e esta ejecutando actualmente (c:/ o el que sea)


Código
  1. #By Doddy H
  2. use Cwd;
  3.  
  4.  
  5. sub getdrive {
  6.  
  7. $path = getcwd();
  8.  
  9. if ($path=~/(.*):\/\//ig or $path=~/(.*):\//) {
  10. return $1.":/";
  11. }
  12.  
  13. }
  14.  

Ejemplo de uso

Código
  1. print getdrive();
  2.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Funcion Ip Publica [Perl]
Scripting
isseu 2 2,981 Último mensaje 8 Mayo 2010, 00:17 am
por leogtz
[Perl] Funcion Speak()
Scripting
BigBear 0 1,549 Último mensaje 10 Octubre 2011, 16:51 pm
por BigBear
[Perl] Funcion wormer()
Scripting
BigBear 0 1,383 Último mensaje 10 Octubre 2011, 16:51 pm
por BigBear
[Perl] Funcion writeword()
Scripting
BigBear 0 1,431 Último mensaje 10 Octubre 2011, 16:52 pm
por BigBear
[Perl] Funcion movewin()
Scripting
BigBear 0 1,388 Último mensaje 11 Octubre 2011, 18:08 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines