恶意代码两则
Code
/*????
????選擇1:60秒后關機,破解:在命名行下輸入:?shutdown?-a
????選擇2:打開10個窗口。
*/
#include?<stdio.h>
#include?<windows.h>
#include?<malloc.h>
int?main?(void){
????int?c;
????int?i;
????int?j;
????
????xuanze:
????????printf("1:?自己死機!\n");
????????printf("2:?月球爆炸!\n");
????????printf("請選擇:");
????????scanf("%d",&c);
????????if(c?==1)?{
????????????system("shutdown?-s?-t?60");
????????}
????????else?if?(2?==?c)?{
????????????printf("你太壞了,我要懲罰你!\n");
????????????for?(j?=?0;?j?<?10;?++j)
????????????system("start");
????????}
????????else{
????????????printf("Seriously!!!");
????????????goto?xuanze;
????????}
????return?0;
????
}
#include?<stdio.h>
#include?<malloc.h>
int?main?(void)?{
????while?(1)?{
????????int?*p?=?(int?*)?malloc?(1000);
????}
????return?0;
}
/*????
????選擇1:60秒后關機,破解:在命名行下輸入:?shutdown?-a
????選擇2:打開10個窗口。
*/
#include?<stdio.h>
#include?<windows.h>
#include?<malloc.h>
int?main?(void){
????int?c;
????int?i;
????int?j;
????
????xuanze:
????????printf("1:?自己死機!\n");
????????printf("2:?月球爆炸!\n");
????????printf("請選擇:");
????????scanf("%d",&c);
????????if(c?==1)?{
????????????system("shutdown?-s?-t?60");
????????}
????????else?if?(2?==?c)?{
????????????printf("你太壞了,我要懲罰你!\n");
????????????for?(j?=?0;?j?<?10;?++j)
????????????system("start");
????????}
????????else{
????????????printf("Seriously!!!");
????????????goto?xuanze;
????????}
????return?0;
????
}
?
/*?內存泄露:?不停地分配長度為1000字節的內存塊?*/#include?<stdio.h>
#include?<malloc.h>
int?main?(void)?{
????while?(1)?{
????????int?*p?=?(int?*)?malloc?(1000);
????}
????return?0;
}
?
轉載于:https://www.cnblogs.com/jinrize/archive/2009/11/15/1603414.html
總結
- 上一篇: spring cloud 路由
- 下一篇: Winform控件拖动