WINAPI HOOK 习作,变速齐 FOR XP(9X没测试过)(0分)

  • 主题发起人 主题发起人 白河愁
  • 开始时间 开始时间

白河愁

Unregistered / Unconfirmed
GUEST, unregistred user!
http://xiaoxiao.ck97.com/kryso/speed.zip<br><br>在某个进程中按 CTRL+F11 开始 减速,<br>按 CTRL+F12 恢复,请各位大虾指教.
 
把源码贴上来,看看啰,<br>不是病毒吧,别害我吆
 
把程序改改啰,还要输入 数值 难的查,你不用标题名啰,还有怎么加速了,<br>我没感觉
 
1 不用贴代码,bpx 一下 gettickcount 就知道了。<br>2 找个 特训,然后在 &nbsp;“按 ENTER 开始”那个画面按CTRL+F11,进入后就有效果了。
 
bpx 是什么? &nbsp;
 
bpx是softice下断点的指令。<br><br>楼主公布一下源代码吧。
 
笔记列表中有进入Ring0的例子和方法;<br>还有广为流传的用Porttalk进入Ring0并且制作变速齿轮的文章,在很多地方都<br>找得到。
 
ring0 在NT 内核下就取不到了。<br>现在采用的技术不太好,要重写整个 api,对许多 api 都不能用,苦思中....
 
用porttalk22操作端口/Windows 9x变速齿轮#<br>刚找到的没试过<br><br>unit Unit1;<br><br>interface<br><br>uses<br>&nbsp; Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br>&nbsp; StdCtrls;<br><br>type<br>&nbsp; TForm1 = class(TForm)<br>&nbsp; &nbsp; Button1: TButton;<br>&nbsp; &nbsp; Button2: TButton;<br>&nbsp; &nbsp; Button3: TButton;<br>&nbsp; &nbsp; procedure Button1Click(Sender: TObject);<br>&nbsp; &nbsp; procedure Button2Click(Sender: TObject);<br>&nbsp; &nbsp; procedure Button3Click(Sender: TObject);<br>&nbsp; private<br>&nbsp; &nbsp; { Private declarations }<br>&nbsp; public<br>&nbsp; &nbsp; { Public declarations }<br>&nbsp; end;<br><br>var<br>&nbsp; Form1: TForm1;<br><br>implementation<br><br>{$R *.DFM}<br>procedure Speed(count:word); stdcall;<br>const ExceptionUsed = $03; &nbsp; &nbsp; &nbsp; &nbsp;{ 中断号也可以用其它的中断号}<br>var<br>&nbsp; IDT : array [0..5] of byte; { 保存中断描述符表}<br>&nbsp; lpOldGate : dword; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{存放旧向量}<br>begin<br>&nbsp; &nbsp;asm<br>&nbsp; &nbsp; &nbsp;push ebx<br>&nbsp; &nbsp; &nbsp;sidt IDT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{读入中断描述符表}<br>&nbsp; &nbsp; &nbsp;mov ebx, dword ptr [IDT+2]{IDT表基地址}<br>&nbsp; &nbsp; &nbsp;add ebx, 8*ExceptionUsed &nbsp;{计算中断在中断描述符表中的位置}<br>&nbsp; &nbsp; &nbsp;cli &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {关中断}<br>&nbsp; &nbsp; &nbsp;mov dx, word ptr [ebx+6] &nbsp;{取6,7字节 另外4字节用于门属性和选择子 }<br>&nbsp; &nbsp; &nbsp;shl edx, 16d &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{左移16位}<br>&nbsp; &nbsp; &nbsp;mov dx, word ptr [ebx] &nbsp; &nbsp;{取1,2字节 &nbsp;}<br>&nbsp; &nbsp; &nbsp;mov [lpOldGate], edx &nbsp; &nbsp; &nbsp;{保存旧的中断门}<br>&nbsp; &nbsp; &nbsp;mov eax, offset @@Ring0Code &nbsp; {修改向量,指向Ring0级代码段}<br>&nbsp; &nbsp; &nbsp;mov word ptr [ebx], ax &nbsp; &nbsp; &nbsp; &nbsp;{低16位,保存到1,2字}<br>&nbsp; &nbsp; &nbsp;shr eax, 16d<br>&nbsp; &nbsp; &nbsp;mov word ptr [ebx+6], ax &nbsp; &nbsp; &nbsp;{高16位,保存到6,7位}<br>&nbsp; &nbsp; &nbsp;int ExceptionUsed &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {发生中断}<br>&nbsp; &nbsp; &nbsp;mov ebx, dword ptr [IDT+2] &nbsp; &nbsp;{重新定位到中断描述符表中}<br>&nbsp; &nbsp; &nbsp;add ebx, 8*ExceptionUsed<br>&nbsp; &nbsp; &nbsp;mov edx, [lpOldGate]<br>&nbsp; &nbsp; &nbsp;mov word ptr [ebx], dx<br>&nbsp; &nbsp; &nbsp;shr edx, 16d<br>&nbsp; &nbsp; &nbsp;mov word ptr [ebx+6], dx &nbsp; &nbsp; &nbsp;{恢复被改了的向量}<br>&nbsp; &nbsp; &nbsp;pop ebx<br>&nbsp; &nbsp; &nbsp;jmp @@exit1<br>&nbsp; &nbsp; @@Ring0Code: &nbsp; &nbsp;{Ring0级代码段}<br>&nbsp; &nbsp; &nbsp;{0011 0100}<br>&nbsp; &nbsp; &nbsp; mov al,$34 &nbsp; &nbsp;{写入8253控制寄存器,设置写0号定时器}<br>&nbsp; &nbsp; &nbsp; out $43,al<br>&nbsp; &nbsp; &nbsp; mov ax,Count<br>&nbsp; &nbsp; &nbsp; out $40,al &nbsp; &nbsp;{写定时值低位}<br>&nbsp; &nbsp; &nbsp; mov al,ah<br>&nbsp; &nbsp; &nbsp; out $40,al &nbsp; &nbsp;{写定时值高位}<br>&nbsp; &nbsp; &nbsp; iretd &nbsp; &nbsp; &nbsp; &nbsp; {中断返回}<br>&nbsp; &nbsp;@@exit1:<br>&nbsp; &nbsp;end;<br>end;<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>&nbsp; &nbsp;Speed($6000); //慢<br>end;<br><br>procedure TForm1.Button2Click(Sender: TObject);<br>begin<br>&nbsp; &nbsp;Speed($1742); <br>end;<br><br>procedure TForm1.Button3Click(Sender: TObject);<br>begin<br>&nbsp; &nbsp;Speed($500); //快<br>end;<br><br>end.<br>
 

Similar threads

I
回复
0
查看
692
import
I
I
回复
0
查看
771
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
696
import
I
后退
顶部