hacker


Ingresar con nombre de usuario, contraseña y duración de la sesión
| Portal Hacker | Editorial | Descargas | Ezine |
Inicio Ayuda Ingresar Registrarse
10 de Octubre de 2008, 11:17:31
Noticias: Privacidad - ¿Necesitas que se depure cierta informacion en nuestro portal?
Para ver este enlace Registrate o Inicia Sesion
> leer aqui

+  Foros pOrtal Hacker
|-+  Programacion
| |-+  Programación en general
| | |-+  Visual Basic (Moderadores: ranefi, crypto136, ziBboh, >> s E t H <<)
| | | |-+  Ayuda con VBscript para saber Version de programa
0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Ayuda con VBscript para saber Version de programa  (Leído 327 veces)
zack0zack
Recien llegado
*
Desconectado Desconectado

Mensajes: 10



Ver Perfil
« : 12 de Mayo de 2007, 01:24:23 »

necesito ayuda para saber la version de cualquier programa con vbscript.
lo que tengo hasta ahora es abrir el archivo (.exe) con fso.OpenTextFi le y obtener la parte de la informacion .
En línea
zack0zack
Recien llegado
*
Desconectado Desconectado

Mensajes: 10



Ver Perfil
« Respuesta #1 : 20 de Junio de 2007, 01:38:41 »

Todo esto lo saque imbestigando con un editor hexadecimal archivos EXE y DLL
y comparandolo con las propiedades del archivo.

Al final de cada variable hay caracteres de sobra que no encuntro la forma de
quitarlos ya que la cantidad de caracteres varia dependiendo de la propiedad
del archivo
si alguin le encuentra un problema o lo mejora por favor subalo al foro o
embiamelo a: zack0zack@hotmail.com

guardar como: version.VBS
*********************** CORTAR AQUI ****************************

set fso=CreateObject("Scripting.File SystemObject")

FILE=inputbox("Archivo:")
if FILE=""then WScript.Quit

set f = fso.OpenTextFi le(FILE)   'abro el archivo
a = f.ReadAll         'lo leo todo
f.close            'cierro el archivo


'Variable donde empieza informacion del Archivo
DeclaracionInf o = "V" & chr(00) & "S" & chr(00) & "_" & chr(00) & "V" & chr(00) & "E" & chr(00) & "R" & chr(00) & "S" & chr(00) & "I" & chr(00) & "O" & chr(00) & "N" & chr(00) & "_" & chr(00) & "I" & chr(00) & "N" & chr(00) & "F" & chr(00) & "O"

a = mid(a,instr(a,DeclaracionInfo))
a = replace(a,chr(00) & chr(01) & chr(00),",+|;")   'Creo delimitador para la matriz, antes de sacar los 00

'bucle para borrar caracteres indeceables como los 00
'los caracteres que quedan son:
' a-z A-Z 0-9 (Avance de línea)(Retorno de carro)(espacio)!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~€‚ƒ„‘’“”–—˜™©¿
for x = 0 to 9
   a = replace(a,chr(x),"")
Next
   a = replace(a,chr(11),"")
   a = replace(a,chr(12),"")
For x = 14 to 31
   a = replace(a,chr(x),"")
Next
   a = replace(a,chr(127),"")
   a = replace(a,chr(129),"")
For x = 133 to 144
   a = replace(a,chr(x),"")
Next
   a = replace(a,chr(149),"")
For x = 154 to 168
   a = replace(a,chr(x),"")
Next
   a = replace(a,chr(170),"")
   a = replace(a,chr(171),"")
   a = replace(a,chr(172),"")
For x = 173 to 190
   a = replace(a,chr(x),"")
Next
For x = 192 to 255
   a = replace(a,chr(x),"")
Next

'encrontre archivos que al final de la informacion por lo general tiene
'esto <?xml por lo que desde de esto ya no necesito esto lo quito
if instr(a,"<?xml")<>0 then a = left(a,instr(a,"<?xml")-1)


a = replace(a,",+|;VarFileInfo$Translation","")      'no le encontre utilidad a esto por eso lo borro

Info = Split(a,",+|;")  'Creo matriz para separar los datos

'bucle donde pongo los datos a las variables
for x=0 to ubound(Info)
info(x) = left(info(x),len(info(x))-1)
if instr(info(x),"CompanyName") <>0 then
   Organizacion = replace(info(x),"CompanyName","")
end if
if instr(info(x),"FileDescriptio n") <>0 then
   Descripcion = replace(info(x),"FileDescriptio n","")
end if
if instr(info(x),"FileVersion") <>0 then
   VersionArchivo = replace(info(x),"FileVersion","")
end if
if instr(info(x),"InternalName") <>0 then
   NombreInterno = replace(info(x),"InternalName","")
end if
if instr(info(x),"LegalCopyright") <>0 then
   Copyright = replace(info(x),"LegalCopyright","")
end if
if instr(info(x),"OriginalFilena me") <>0 then
   NombreOriginal Archivo = replace(info(x),"OriginalFilena me","")
end if
if instr(info(x),"ProductName") <>0 then
   NombreProducto = replace(info(x),"ProductName","")
end if
if instr(info(x),"ProductVersion") <>0 then
   Version = replace(info(x),"ProductVersion","")
end if
if instr(info(x),"LegalTrademark s") <>0 then
   MarcasRegistra das = replace(info(x),"LegalTrademark s","")
end if
if instr(info(x),"PrivateBuild") <>0 then
   DescripcionVer sionPrivada = replace(info(x),"PrivateBuild","")
end if
if instr(info(x),"SpecialBuild") <>0 then
   DescripcionVer sionEspecial = replace(info(x),"SpecialBuild","")
end if
if instr(info(x),"Comments") <>0 then
   Comentarios = replace(info(x),"Comments","")
end if
next

'muestro información
wscript.echo "Organizacion: " & Organizacion & vbcrlf & _
"Descripcion: " & Descripcion & vbcrlf & _
"Version del Archivo: " & VersionArchivo & vbcrlf & _
"Nombre Interno: " & NombreInterno & vbcrlf & _
"Copyright: " & Copyright & vbcrlf & _
"Nombre original del archivo: " & NombreOriginal Archivo & vbcrlf & _
"Nombre del Producto: " & NombreProducto & vbcrlf & _
"Version: " & Version & vbcrlf & _
"Marcas Registradas: " & MarcasRegistra das & vbcrlf & _
"Descripcion de la version Privada: " & DescripcionVer sionPrivada & vbcrlf & _
"Descripcion de la version Especial: " & DescripcionVer sionEspecial"  & vbcrlf & _
"Comentarios: " & Comentarios


msgbox "TERMINE "&WScript.Script FullName

*********************** FIN ****************************
En línea
Páginas: [1] Ir Arriba Imprimir 
« anterior próximo »
Ir a:  


Ingresar con nombre de usuario, contraseña y duración de la sesión

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC hacker

Juegos gratis - Articulos PHP - Juegos - Trucos - Letras - Juegos - Juegos Online