Icarius Posted May 30, 2006 Report Posted May 30, 2006 Descriere Dos based turbo "C" program which Enable/Disable .EXE or .COM file execution. Please disable any memory resident Anti Virus Program(Shield.)as this program changes the physical header of the .EXE or .COM file in order to make permanent changes. No need to creat another encrypted file. Now nobody can copy/execute your secret program.Va dati seama ce puteti face cu asa ceva? :@ #include <fcntl.h>#include <io.h>#include <dos.h>#include <stdio.h>#include <string.h>#include <process.h>unsigned char buffer[3];FILE *fd;int handle;fail(char *);void pass(char *);main(int argc,char *argv[])   {   int n;   if(argc!=3)     {     printf("nFailpass Utility v1.0 Email: [email]chingpongin@yahoo.co.in[/email]");     printf("nEnable/Disable .EXE or .COM execution");     printf("nsyntex failpass fail <filename.extension>");     printf("n or");     printf("n failpass pass <filename.extension>");     exit(2);   }   strupr(argv[1]);   n=strcmp(argv[1],"FAIL");   if(n==0)     {     fail(argv[2]);     exit(2);   }   n=strcmp(argv[1],"PASS");   if(n==0)     {     pass(argv[2]);     exit(2);   }   return 0;}fail(char *fname)   {   _chmod(fname,1,FA_ARCH);   fd=fopen(fname,"rb+");   if(fd==NULL)     {     printf("nCann't open %snn",fname);     exit(2);   }   fseek(fd,0,SEEK_SET);   fread(buffer,2,1,fd);   if(buffer[0]==0xcd)   if(buffer[1]==0x20)     {     fclose(fd);     printf("n%s already protected...nn",fname);     exit(2);   }   fseek(fd,0,SEEK_END);   fwrite(buffer,2,1,fd);   fseek(fd,0,SEEK_SET);   buffer[0]=0xcd; /* don't take any PANGA with this line */   buffer[1]=0x20; /* don't take any PANGA with this line */   fwrite(buffer,2,1,fd);   fclose(fd);   return 0;}void pass(char *fname)   {   int xyz;   fd=fopen(fname,"rb+");   if(fd==NULL)     {     fclose(fd);     printf("nCannot open file %snn",fname);     exit(2);   }   fseek(fd,0,SEEK_SET);   fread(buffer,2,1,fd);   if(buffer[0]!=0xcd)   if(buffer[1]!=0x20)     {     fclose(fd);     printf("n%s is NOT protected....nn",fname);     exit(2);   }   fseek(fd,-2,SEEK_END);   fread(buffer,2,1,fd);   fseek(fd,0,SEEK_SET);   fwrite(buffer,2,1,fd);   fclose(fd);   handle=open(fname,O_RDWR);   chsize(handle,(filelength(handle))-2);   close(handle);} Quote
maleficus Posted June 20, 2006 Report Posted June 20, 2006 pai e cod de c.tre sa-l compilezi in c .normal. Quote
Icarius Posted June 20, 2006 Author Report Posted June 20, 2006 Traiasca Copy/Paste-u care nu vrea sa afiseze creditele. Sau nu e de la Copy Paste?!explica-te mai pe intelesul meu... Quote
Icarius Posted June 20, 2006 Author Report Posted June 20, 2006 pai codul il aveam scris intr-un txt. l-am luat mai demult de pe un site, nu mai stiu care. Quote
nos Posted June 22, 2006 Report Posted June 22, 2006 tre sa il compilezi cu borland c++ ba ce progrmatori aici stiu yo la 11 ani si nu stie el...... =)) Quote