如何在xp下得到拨号密码

StarRainBow 2004-08-29 09:31:35
正做一个程序,使用RasGetEntryDialParams取拨号参数,得到的密码却是****************,
怎么才能得到正确的密码呢?
...全文
284 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
StarRainBow 2004-09-02
  • 打赏
  • 举报
回复
不行啊,把RASDIALPARAMS全部清0后再调用RasGetEntryDialParams,查看RASDIALPARAMS,结果除了szUsername和szPassword之外,全部还是0,可是利用dialupass这个软件却可以查看到密码,跟踪它后它也显示一堆*,是否在这之前还需要设置什么权限例如OpenProcessToken,SetPrivilege之类的,可是又没有跟踪到,难道没有人会了吗?
yifei1900 2004-08-30
  • 打赏
  • 举报
回复
学习。
帮忙顶一下
Eastunfail 2004-08-30
  • 打赏
  • 举报
回复
就是在szPassword中啊。它说了啊
StarRainBow 2004-08-30
  • 打赏
  • 举报
回复
这个意思就是szPassword包含一个指向已保存密码的Handle啊!可惜不知道保存在那里。
蓝色光芒 2004-08-30
  • 打赏
  • 举报
回复
如果用户保存了密码的话,而且第一次输入的时候你又没有记录下来的话,就只有监视IO提交的关于Model的命令。然后分析出来。
如果用户每次都输入的密码的话,记录键盘就行了。
Eastunfail 2004-08-30
  • 打赏
  • 举报
回复
它说的很清楚了啊
szPassword contains a handle to the saved password.

按照这个描述,2K和XP为了安全是不会让你得到密码的。
StarRainBow 2004-08-30
  • 打赏
  • 举报
回复
我只是要读出用户名和密码,在98下可以读出,在2000和XP下返回许多*,下面的内容摘自MSDN,
The szPassword member of the RASDIALPARAMS structure does not return the actual password. Instead, szPassword contains a handle to the saved password. Substitute this handle for the saved password in subsequent calls to RasSetEntryDialParams and RasDial. When presented with this handle, RasDial retrieves and uses the saved password. The value of this handle may change in future versions of the operating system; do not develop code that depends on the contents or format of this value.
就是说得不到密码,这个隐藏的Handle在那里呢?
Eastunfail 2004-08-30
  • 打赏
  • 举报
回复
把要拨的号的名字传入Dial的Name就可以了
Eastunfail 2004-08-30
  • 打赏
  • 举报
回复
如果你只是要实现拨号。那么:

procedure Dial(const Name:string);
var return,ereturn,hRas:dword;
var dPara:TRASDIALPARAMS;
var error:array[0..255] of char;
begin
FillChar(dPara,sizeof(TRESDIALPARAMS),0);
dPara.dwSize:=sizeof(TRESDIALPARAMS);
strPCopy(dPara.szEntryName,Name);
hRas:=0;
return:=RasDial(nil,nil,dPara,0,nil,hRas);
if(rtn<>0)then exit;
if(hRas<>0)then RasHangUp(hRas);
RasGetErrorString(Return,error,sizeof(error);
raise Exception.Create(StrPas(Error));
end;
windy2008 2004-08-29
  • 打赏
  • 举报
回复
关注
windy2008 2004-08-29
  • 打赏
  • 举报
回复
不清楚哦.
呵呵.....

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧