Creando Programa para develar Asteriscos (Visual Basic)
Cargado en Visual Basic on 05.jun, 2008
Aqui les muestro el codigo fuente de un programa hecho en Visual Basic que se utiliza para develar las claves enmascaradas con asterisco (*) en las ventanas activas, esto es cortesia de Nirsoft:
'Password Revealer 'Copyright (c) 2002 Nir Sofer 'Web site: http://nirsoft.mirrorz.com ' 'The following code sample scans all opened windows, and reveals the passwords 'behind the password text-boxes (with asterisks '***'). 'This code sample works properly only on Windows 95/98/ME/NT. It doesn't work on Windows 2000/XP. ' Public Declare Function EnumWindows Lib "user32" _ (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long Public Declare Function EnumChildWindows Lib "user32" _ (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Public Type POINTAPI x As Long y As Long End Type Public Type MSG hwnd As Long message As Long wParam As Long lParam As Long time As Long pt As POINTAPI End Type Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _ (ByVal hwnd As Long, ByVal nIndex As Long) As Long Public Const GWL_STYLE = (-16) Public Const ES_PASSWORD = &H20& Public Const EM_SETPASSWORDCHAR = &HCC Public Declare Function InvalidateRect Lib "user32" _ (ByVal hwnd As Long, lpRect As Any, ByVal bErase As Long) As Long Public Declare Function UpdateWindow Lib "user32" _ (ByVal hwnd As Long) As Long Public Function EnumChildWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long If (GetWindowLong(hwnd, GWL_STYLE) And ES_PASSWORD) <> 0 Then 'Clear the password character SendMessage hwnd, EM_SETPASSWORDCHAR, 0, 0 'Repaint the window InvalidateRect hwnd, ByVal 0, 0 UpdateWindow hwnd End If EnumChildWindowsProc = 1 End Function Public Function EnumWindowsProc(ByVal hwnd As Long, ByVal lParam As Long) As Long 'Enumerating all child windows. EnumChildWindows hwnd, AddressOf EnumChildWindowsProc, 0 EnumWindowsProc = 1 End Function Public Sub EnumPasswords() 'Enumerating all top-level windows. EnumWindows AddressOf EnumWindowsProc, 0 End Sub
Si quieres Bajarte el proyecto lo puedes hacer desde aqui: http://www.nirsoft.net/vb/passrev.zip

Leave a Reply