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

 

 


Tema destacado: Los 10 CVE más críticos (peligrosos) de 2020


  Mostrar Mensajes
Páginas: 1 ... 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 [412] 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 ... 620
4111  Programación / Programación Visual Basic / Re: Base De datos Con VB en: 16 Enero 2014, 19:19 pm
Puedes probar con firebird: http://firebirdsql.org/

Usando ADO puedes manipularlo sin problemas...

Saludos!
4112  Programación / Programación Visual Basic / Re: Como leer info del área de notificación en: 16 Enero 2014, 15:39 pm
Debes llamar a EnumWindows, pasandole como callback EnumWindowsProc.

Saludos!
4113  Programación / Programación Visual Basic / Re: Como leer info del área de notificación en: 16 Enero 2014, 02:33 am
Un ejemplo:

Código
  1. Option Explicit
  2.  
  3. Public Declare Function EnumWindows Lib "user32.dll" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  4. Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
  5. Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
  6. Public Const GWL_STYLE = (-16)
  7.  
  8. Declare Function AccessibleObjectFromWindow Lib "oleacc" (ByVal hwnd As Long, ByVal dwId As Long, riid As tGUID, ppvObject As Object) As Long
  9. 'Esta API que sigue se usa para enumerar los objetos IAccessible de los children de la ventana
  10. 'Declare Function AccessibleChildren Lib "oleacc" (ByVal paccContainer As IAccessible, ByVal iChildStart As Long, ByVal cChildren As Long, rgvarChildren As Variant, pcObtained As Long) As Long
  11.  
  12. Type tGUID
  13.    lData1            As Long '4 bytes DWORD
  14.    nData2            As Integer '2 bytes
  15.    nData3            As Integer '2 bytes
  16.    abytData4(0 To 7) As Byte  '8 bytes (array)
  17. End Type
  18.  
  19. Type AccObject
  20.    objIA As IAccessible 'objeto IAccessible de oleacc.dll
  21.    lngChild As Long '4 bytes
  22. End Type
  23.  
  24. Global Enumerando As Boolean
  25. Global Marcar As Long
  26.  
  27. Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long
  28. 'Esta funcion es el Callback de la API EnumWindows (Se llama por cada ventana de nivel 1 que encuentre)
  29. 'Los BalloonTips del Area de Notificacion estan en el nivel 1!
  30.  
  31. Dim retval As Long ' return value
  32. Dim accName As String ' guardar el nombre de la propiedad de IAccessible
  33. Dim clsname As String ' guarda nombre de la clase de la ventana
  34. Dim oParent As IAccessible  ' objeto IAccessible que se llenara al llamar a IAccessibleFromHwnd
  35.  
  36. 'Room for classname
  37. clsname = Space(200)
  38. 'Get classname string
  39. retval = GetClassName(hwnd, clsname, 200)
  40. clsname = Trim(Mid(clsname, 1, retval))
  41. 'get style DWORD of window
  42. retval = GetWindowLong(hwnd, GWL_STYLE)
  43.  
  44. If LCase(clsname) = "tooltips_class32" Then     'if classname is a tooltip
  45.    If retval And &HC0 Then                     'and the style has the TTS_BALLOON (0x40) and the TTS_CLOSE (0x80) bits set
  46.        Set oParent = IAccessibleFromHwnd(hwnd) 'get IAccessible object of window
  47.        accName = Trim(oParent.accName)         'get accName property value
  48.        If InStr(1, accName, "Threat detected by Sophos.") <> 0 Then 'compare propval with my text
  49.            Form1.Label1.Caption = "Sophos Detectado!!!" 'jejeje
  50.        End If
  51.    End If
  52. End If
  53.  
  54. EnumWindowsProc = 1 ' return value of 1 means continue enumeration
  55. End Function
  56.  
  57. Function IAccessibleFromHwnd(hwnd As Long) As IAccessible
  58. 'Obtiene objeto IAccessible de una ventana a partir del hwnd de la misma
  59. Dim oIA As IAccessible
  60. Dim tg As tGUID
  61. Dim lReturn As Long
  62.  
  63. ' Define the GUID for the IAccessible object
  64. ' {618736E0-3C3D-11CF-810C-00AA00389B71}
  65.  
  66. With tg
  67.    .lData1 = &H618736E0
  68.    .nData2 = &H3C3D
  69.    .nData3 = &H11CF
  70.    .abytData4(0) = &H81
  71.    .abytData4(1) = &HC
  72.    .abytData4(2) = &H0
  73.    .abytData4(3) = &HAA
  74.    .abytData4(4) = &H0
  75.    .abytData4(5) = &H38
  76.    .abytData4(6) = &H9B
  77.    .abytData4(7) = &H71
  78. End With
  79.  
  80. ' Retrieve the IAccessible object from the window identified by hwnd
  81. lReturn = AccessibleObjectFromWindow(hwnd, 0, tg, oIA)
  82. ' Return Object
  83. Set IAccessibleFromHwnd = oIA
  84. End Function
  85.  

El código anterior debe ir en un modulo y detectaría una notificacion tipo balloon. En este caso, detecta la ventana que muestra el AV Sophos, al detectar un virus...  :P

Saludos!
4114  Seguridad Informática / Seguridad / Re: Ofuscadores y Descompiladores en: 15 Enero 2014, 04:51 am
Lenguaje de programación: Visual Studio 2013.

Eso no es un lenguaje de programación...  :P

Qué usas? C++, .NET?
4115  Programación / Programación Visual Basic / Re: ¿Si textbox contiene? en: 15 Enero 2014, 01:52 am
Tienes la función InStr: http://msdn.microsoft.com/en-us/library/8460tsh1(v=vs.90).aspx

Funciona tanto en VB6 como en .NET.

Saludos!
4116  Programación / Programación Visual Basic / Re: Copiar la porta papeles, error en código. en: 15 Enero 2014, 01:50 am
En VB 6 tienes el objeto Clipboard: http://msdn.microsoft.com/es-es/library/ebwdx8yh(v=vs.90).aspx

Saludos!
4117  Programación / Programación C/C++ / Re: Worm básico en C++ en: 14 Enero 2014, 00:40 am
En C no hay "true", no es verdad? (quizás me equivoque, yo soy hijo de C++)

Citar
Boolean type

C99 added a boolean (true/false) type (_Bool) which is defined in the <stdbool.h> header. Additionally, the standard requires that macros are defined to alias the type as bool as well as providing macros for true and false.

Source: http://en.wikipedia.org/wiki/C_data_types

Saludos!

PD: C11 es el standar hoy día, e incluye a C99: http://en.wikipedia.org/wiki/ANSI_C
4118  Programación / Programación C/C++ / Re: Worm básico en C++ en: 13 Enero 2014, 13:09 pm
Nunca se me había ocurrido lo del "1==1", me ahorro una variable y una suma...

Tambien puedes usar While(True)

Saludos!
4119  Foros Generales / Foro Libre / Re: ¿Por qué los informaticos somos considerados como gordos frikis? en: 9 Enero 2014, 19:39 pm
Creo que el problema consiste en que la gran mayoria es ignorante, por ello piensan opinan así.

De todas formas: A quién carajos le importa lo que piense opine ese tipo de gente?

Saludos!
4120  Foros Generales / Foro Libre / Re: ¿La tablet que viene de promoción en "MARCA" tiene Google Play? en: 8 Enero 2014, 23:30 pm
La tablet parece ser esta: http://prixton.com/tienda/product_info.php?products_id=216

O bien es muy parecida. hay un par de specs que son diferentes, pero bueno, ahi hay mas info.

Aunque no dice nada de Play...

Saludos!
Páginas: 1 ... 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 [412] 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 ... 620
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines