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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Mensajes
Páginas: 1 ... 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 [34] 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
331  Programación / Programación Visual Basic / Re: Guardar en una variable el resultado de una reg query en cmd en: 16 Enero 2013, 19:51 pm
Porque no lo haces todo desde vb6?


forma 1

Código
  1. Private Sub Form_Load()
  2. MsgBox Registry_Read("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\", "ProxyEnable")
  3. End Sub
  4.  
  5. Private Function Registry_Read(Key_Path, Key_Name) As Variant
  6.  
  7.    On Error Resume Next
  8.  
  9.    Dim Registry As Object
  10.  
  11.    Set Registry = CreateObject("WScript.Shell")
  12.  
  13.    Registry_Read = Registry.RegRead(Key_Path & Key_Name)
  14.  
  15. End Function
  16.  
  17.  

forma 2

Código
  1. Private Declare Function RegCloseKey& Lib "advapi32.dll" (ByVal hKey&)
  2. Private Declare Function RegOpenKeyExA& Lib "advapi32.dll" (ByVal hKey&, ByVal lpszSubKey$, dwOptions&, ByVal samDesired&, lpHKey&)
  3. Private Declare Function RegQueryValueExA& Lib "advapi32.dll" (ByVal hKey&, ByVal lpszValueName$, ByVal lpdwRes&, lpdwType&, ByVal lpDataBuff$, nSize&)
  4. Private Declare Function RegQueryValueEx& Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey&, ByVal lpszValueName$, ByVal lpdwRes&, lpdwType&, lpDataBuff&, nSize&)
  5.  
  6. Const HKEY_CLASSES_ROOT = &H80000000
  7. Const HKEY_CURRENT_USER = &H80000001
  8. Const HKEY_LOCAL_MACHINE = &H80000002
  9. Const HKEY_USERS = &H80000003
  10.  
  11. Const ERROR_SUCCESS = 0&
  12. Const REG_SZ = 1&                          ' Unicode nul terminated string
  13. Const REG_DWORD = 4&                       ' 32-bit number
  14.  
  15. Const KEY_QUERY_VALUE = &H1&
  16. Const KEY_SET_VALUE = &H2&
  17. Const KEY_CREATE_SUB_KEY = &H4&
  18. Const KEY_ENUMERATE_SUB_KEYS = &H8&
  19. Const KEY_NOTIFY = &H10&
  20. Const KEY_CREATE_LINK = &H20&
  21. Const READ_CONTROL = &H20000
  22. Const WRITE_DAC = &H40000
  23. Const WRITE_OWNER = &H80000
  24. Const SYNCHRONIZE = &H100000
  25. Const STANDARD_RIGHTS_REQUIRED = &HF0000
  26. Const STANDARD_RIGHTS_READ = READ_CONTROL
  27. Const STANDARD_RIGHTS_WRITE = READ_CONTROL
  28. Const STANDARD_RIGHTS_EXECUTE = READ_CONTROL
  29. Const KEY_READ = STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY
  30. Const KEY_WRITE = STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY
  31. Const KEY_EXECUTE = KEY_READ
  32. Function RegGetValue$(MainKey&, SubKey$, value$)
  33.   ' MainKey must be one of the Publicly declared HKEY constants.
  34.   Dim sKeyType&       'to return the key type.  This function expects REG_SZ or REG_DWORD
  35.   Dim ret&            'returned by registry functions, should be 0&
  36.   Dim lpHKey&         'return handle to opened key
  37.   Dim lpcbData&       'length of data in returned string
  38.   Dim ReturnedString$ 'returned string value
  39.   Dim ReturnedLong&   'returned long value
  40.   If MainKey >= &H80000000 And MainKey <= &H80000006 Then
  41.      ' Open key
  42.      ret = RegOpenKeyExA(MainKey, SubKey, 0&, KEY_READ, lpHKey)
  43.      If ret <> ERROR_SUCCESS Then
  44.         RegGetValue = ""
  45.         Exit Function     'No key open, so leave
  46.      End If
  47.  
  48.      ' Set up buffer for data to be returned in.
  49.      ' Adjust next value for larger buffers.
  50.      lpcbData = 255
  51.      ReturnedString = Space$(lpcbData)
  52.  
  53.      ' Read key
  54.      ret& = RegQueryValueExA(lpHKey, value, ByVal 0&, sKeyType, ReturnedString, lpcbData)
  55.      If ret <> ERROR_SUCCESS Then
  56.         RegGetValue = ""   'Value probably doesn't exist
  57.      Else
  58.        If sKeyType = REG_DWORD Then
  59.            ret = RegQueryValueEx(lpHKey, value, ByVal 0&, sKeyType, ReturnedLong, 4)
  60.            If ret = ERROR_SUCCESS Then RegGetValue = CStr(ReturnedLong)
  61.        Else
  62.            RegGetValue = Left$(ReturnedString, lpcbData - 1)
  63.        End If
  64.    End If
  65.      ' Always close opened keys.
  66.      ret = RegCloseKey(lpHKey)
  67.   End If
  68. End Function
  69.  
  70.  
  71.  
  72. Private Sub Form_Load()
  73. MsgBox (RegGetValue$(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable"))
  74. End Sub
  75.  

saludos
332  Seguridad Informática / Análisis y Diseño de Malware / Re: [DUDA] Hook a la api createprocess (Ansi C) en: 16 Enero 2013, 13:37 pm
espero que esto te ayude.


http://www.codeproject.com/Articles/11985/Hooking-the-native-API-and-controlling-process-cre

http://forum.sysinternals.com/createprocess-api-hook_topic13138.html

http://easyhook.codeplex.com/discussions/42827

http://www.rohitab.com/discuss/topic/37425-how-to-hook-a-suspended-process-by-createprocess-create-suspended/


saludos
333  Programación / Programación Visual Basic / Re: cargar exe en vb6 en: 16 Enero 2013, 01:45 am
pues declara tu variable que sera el nombre.

Código
  1. dim nombre as string
  2. nombre = CommonDialog1.FileName
  3. 'y usas el nombre para el open nombre for binary as  #1 etc....
  4.  

y usa los link de la respuesta anterior ahí esta todo bien documentado.
Saludos
334  Programación / Programación Visual Basic / Re: cargar exe en vb6 en: 16 Enero 2013, 01:24 am
tengo pereza te respondo  citando a raul338.


saludos
335  Programación / Programación Visual Basic / Re: cargar exe en vb6 en: 16 Enero 2013, 01:13 am
cuando dices cargar? quieres decir ejecutar?
336  Programación / Java / Re: Ayuda urgente con Proyecto de maquina de turing en: 15 Enero 2013, 23:29 pm
vamos a aprender. googling.

http://www.youtube.com/results?search_query=maquina+de+turing+java&oq=maquina+de+turing+java&gs_l=youtube-reduced.3..0.5316.10351.0.11448.6.4.0.2.2.0.426.1280.0j1j0j2j1.4.0...0.0...1ac.1.Th__yXX8RTs
337  Programación / Programación Visual Basic / Re: se puede usar editor hexadecimal en vb6 en: 15 Enero 2013, 20:10 pm
La aclaracion era para asdexiva

:xD

Saludos!

sorry jajaja saludos  ;D
338  Programación / Programación Visual Basic / Re: pequeñisima duda hex en: 15 Enero 2013, 20:06 pm
Lo escribes con chr(0) mira.

Código
  1. Open "C:\Users\CENTRAL\Desktop\XD.txt" For Binary As #1
  2. Dim bytes() As Byte
  3. bytes() = StrConv("hola" & Chr(0), vbFromUnicode)
  4. Put #1, , bytes()
  5. Close #1

Te recomiendo leer sobre Ansi y Unicode.

saludos
339  Programación / Programación Visual Basic / Re: pequeñisima duda hex en: 15 Enero 2013, 19:50 pm
cuando dices nulo diras chr(0)?
340  Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Splitty v1.0 [Source code] en: 15 Enero 2013, 19:49 pm
Quedo re Guapo!!! me lo bajo pa la colección. y pa' cuando empiece a darle con ganas a NET.

si que te gusta los colores neutros.  :)

Excelente trabajo sigue así. saludos y gracias
Páginas: 1 ... 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 [34] 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines