"Deep
in the sea are riches beyond compare.
But if you seek safety, it is on the shore."
Disclaimer:
I
cannot be held any responsibility for any actions you may do with
the information provided in this site and tutorial provided herein
nor anyone who provided you with this information nor any group
I am involved in can be held responsibility for your actions.
This file is strictly written for educational purpose. If you
do decide to use this site and its tutorial for illegal purposes,
stop reading now! By continuing you agree to the terms mentioned
here.
ANY modifications of the articles provided herein are strictly
prohibited without the author's consent. If you feel you have
something * to add e-mail at itinferno@yahoo.com
I’m
going to assume you know about programming in visual basic and
how to do api programming. Also, I’m going to assume you
have a fairly good idea about how windows work...
Revealing
the passwords behind asterisks
Many applications,
such as CuteFTP and Outlook Express, allows you to enter a password
and use it when it is needed. However, if you forget your password,
you cannot see it, because it's hidden behind asterisks ('****')
characters.
The following code snippet scans all windows on the screen and
reveals the passwords behind the asterisks characters.
This code sample works properly only on Windows 95,98,ME and NT.
Also be aware that this utility will not work with applications
that don't store the password behind the asterisks, such as User
Manager in Windows NT.
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 Msg 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
SendMessage hwnd, EM_SETPASSWORDCHAR, 0, 0
InvalidatRect 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
EnumChildWindows hwnd, AddressOf EnumChildWindowsProc, 0
EnumWindowsProc = 1
End Function
Public
Sub EnumPasswords()
EnumWindows AddressOf EnumWindowsProc, 0
End Sub
-by
Invincible(invincible@usa.com) |