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

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  [Ayuda] Callings Sub y Functions
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Ayuda] Callings Sub y Functions  (Leído 1,954 veces)
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
[Ayuda] Callings Sub y Functions
« en: 8 Octubre 2010, 08:27 am »

Hola, quería saber si me podrían guiar con este tema:

Yo inyecto una dll en un programa, el programa tiene muchas funciónes y procedimientos, como hago para llamarlos desde la dll inyectada? alguna idea? Desde ya muchas gracias por resolver y aclarar mis dudas en los posts. :D ;-) :laugh: ;-) :laugh:

Ej: del ejecutable.

Option Explicit

Private Sub Command1_Click()
Dim var As Long

var = VarPtr(Valor(1, 1))

MsgBox var & " (" & Hex(var) & ")"
End Sub

Public Function Valor(ByVal v1 As Long, ByVal v2 As Long) As Long
Valor = v1 + v2
End Function

Esto hice para saber el address de la función.


« Última modificación: 8 Octubre 2010, 08:50 am por Miseryk » En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
fary


Desconectado Desconectado

Mensajes: 1.062



Ver Perfil WWW
Re: [Ayuda] Callings Sub y Functions
« Respuesta #1 en: 8 Octubre 2010, 20:52 pm »

Fijate si te sirve la api CallWindowProc.

salu2!



En línea

Un byte a la izquierda.
BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: [Ayuda] Callings Sub y Functions
« Respuesta #2 en: 9 Octubre 2010, 02:56 am »

Hola, quería saber si me podrían guiar con este tema:

Yo inyecto una dll en un programa, el programa tiene muchas funciónes y procedimientos, como hago para llamarlos desde la dll inyectada? alguna idea? Desde ya muchas gracias por resolver y aclarar mis dudas en los posts. :D ;-) :laugh: ;-) :laugh:

Ej: del ejecutable.

Option Explicit

Private Sub Command1_Click()
Dim var As Long

var = VarPtr(Valor(1, 1))

MsgBox var & " (" & Hex(var) & ")"
End Sub

Public Function Valor(ByVal v1 As Long, ByVal v2 As Long) As Long
Valor = v1 + v2
End Function

Esto hice para saber el address de la función.

lo que haces hay no es devolver la dirección del proceso, devuelves la dirrecion de variable de RESULTADO del Proceso

si quieres saber la dirrecion del Proceso, Funcion, u otra cosa similar

En un Modulo (Bas)

Código
  1.  
  2. Option Explicit
  3.  
  4. Sub main()
  5. Dim ThisAddress&
  6.    ThisAddress& = Adrs&(AddressOf procesoX)
  7.    MsgBox ThisAddress& & " - (" & Hex(ThisAddress&) & ")"
  8. End Sub
  9.  
  10. Public Function Adrs(ByVal Addrs As Long) As Long
  11.    Adrs& = Addrs&
  12. End Function
  13.  
  14. Public Function procesoX(ParamArray ParametrosX() As Variant) As String
  15.  
  16. End Function
  17.  
  18.  

Dulce Infierno Lunar!¡.
« Última modificación: 9 Octubre 2010, 02:59 am por BlackZeroX » En línea

The Dark Shadow is my passion.
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: [Ayuda] Callings Sub y Functions
« Respuesta #3 en: 9 Octubre 2010, 21:25 pm »

Wow, muchisimas gracias.  ;-)
« Última modificación: 11 Octubre 2010, 23:37 pm por Miseryk » En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: [Ayuda] Callings Sub y Functions
« Respuesta #4 en: 11 Octubre 2010, 23:55 pm »

Hola, quería saber si me podrían guiar con este tema:

Yo inyecto una dll en un programa, el programa tiene muchas funciónes y procedimientos, como hago para llamarlos desde la dll inyectada? alguna idea? Desde ya muchas gracias por resolver y aclarar mis dudas en los posts. :D ;-) :laugh: ;-) :laugh:

Ej: del ejecutable.

Option Explicit

Private Sub Command1_Click()
Dim var As Long

var = VarPtr(Valor(1, 1))

MsgBox var & " (" & Hex(var) & ")"
End Sub

Public Function Valor(ByVal v1 As Long, ByVal v2 As Long) As Long
Valor = v1 + v2
End Function

Esto hice para saber el address de la función.

lo que haces hay no es devolver la dirección del proceso, devuelves la dirrecion de variable de RESULTADO del Proceso

si quieres saber la dirrecion del Proceso, Funcion, u otra cosa similar

En un Modulo (Bas)

Código
  1.  
  2. Option Explicit
  3.  
  4. Sub main()
  5. Dim ThisAddress&
  6.    ThisAddress& = Adrs&(AddressOf procesoX)
  7.    MsgBox ThisAddress& & " - (" & Hex(ThisAddress&) & ")"
  8. End Sub
  9.  
  10. Public Function Adrs(ByVal Addrs As Long) As Long
  11.    Adrs& = Addrs&
  12. End Function
  13.  
  14. Public Function procesoX(ParamArray ParametrosX() As Variant) As String
  15.  
  16. End Function
  17.  
  18.  

Dulce Infierno Lunar!¡.


Y como puedo hacer ahora para llamar esta funcion desde una dll (Injected) :), desde ya muchisimas gracias :)
En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Problema con functions.php
PHP
Xagutxu 0 1,206 Último mensaje 1 Abril 2013, 20:59 pm
por Xagutxu
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines