|
-
June 13th, 2001, 05:32 AM
#1
Cashe pasword
Can u tell api function for retriving windows cache passwords
-
June 13th, 2001, 07:03 AM
#2
Re: Cashe pasword
'module
Declare Function WNetEnumCachedPasswords Lib "mpr.dll" (byval s as string, byval i as Integer, byval b as Byte, byval proc as Long, byval l as Long) as Long
Type PASSWORD_CACHE_ENTRY
cbEntry as Integer
cbResource as Integer
cbPassword as Integer
iEntry as Byte
nType as Byte
abResource(1 to 1024) as Byte
End Type
public Function callback(X as PASSWORD_CACHE_ENTRY, byval lSomething as Long) as Integer
Dim nLoop as Integer
Dim cString as string
Dim ccomputer
Dim Resource as string
Dim ResType as string
Dim Password as string
ResType = X.nType
for nLoop = 1 to X.cbResource
If X.abResource(nLoop) <> 0 then
cString = cString & Chr(X.abResource(nLoop))
else
cString = cString & " "
End If
next
Resource = cString
cString = ""
for nLoop = X.cbResource + 1 to (X.cbResource + X.cbPassword)
If X.abResource(nLoop) <> 0 then
cString = cString & Chr(X.abResource(nLoop))
else
cString = cString & " "
End If
next
Password = cString
cString = ""
'for only the dialup passwords activate next line
'If X.nType <> 6 then GoTo 66
Form1.List1.AddItem " R: " & Resource & " P: " & Password
66
callback = true
End Function
public Sub GetPasswords()
Dim nLoop as Integer
Dim cString as string
Dim lLong as Long
Dim bByte as Byte
bByte = &HFF
nLoop = 0
lLong = 0
cString = ""
Call WNetEnumCachedPasswords(cString, nLoop, bByte, AddressOf callback, lLong)
End Sub
'call from the form
form has Command1 button and List1
private Sub Command1_Click()
Call GetPasswords
End Sub
Iouri Boutchkine
[email protected]
-
June 17th, 2001, 04:56 AM
#3
Re: Cashe pasword
Thank you very much for telling pssword retrival from cashe Its working fine for win95 annd 98but nor on NT Can U tell me Th Reson ?
Any wayy I have one Question for u If u dont mind from where u get all info about API well I was Trying o understand this code but useless i could nt understand but it is working fine for 95 and 98
-
June 18th, 2001, 04:33 AM
#4
Re: Better post this...
...Under Iouri answer, or he will not be informed you post something for his reply. Simply go to Ioury answer, and post your post as a reply to it (up-left corner: a button with "reply to this message").
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, Bruno Paris and all the other wonderful people who made and make Codeguru a great place. Come back soon, you Gurus.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
June 19th, 2001, 01:39 AM
#5
Re: Cashe pasword
Thank you very much for telling pssword retrival from cashe Its working fine for win95 annd 98but nor on NT Can U tell me Th Reson ?
Any wayy I have one Question for u If u dont mind from where u get all info about API well I was Trying o understand this code but useless i could nt understand but it is working fine for 95 and 98
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|