最近做毕业论文,是关于注入漏洞的攻击方法的。一个以前帮朋友弄得PHP防注入,觉得搞防御还是很习惯,当个素材记录下。
<?phpClass StopInject{ /* Title: Stop Injection for Injection Author: ylbhz Contact: ylbhz@hotmail.com Example: $obj = new StopInject(); $obj->SetMessage("Stop Injection!!!"); $obj->Start();
int strlen(char *strIn){__asm{ MOV esi,strIn XOR eax,eax CDQ__loop: LODSB CMP al,ah JE __end INC EDX JMP __loop__end: MOV eax,edx}}
}
上面这个strlen作废,下面这个:
int strlen(char *sIn){ __asm {