Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  A
Language: C/C++
Code:
#include <stdio.h>
#include <stdlib.h>

main(int argc,char *argv[]){
if(argc!=2){
printf("zc <zipe file>n");
}
FILE *zipe=fopen(argv[1],"r");
if(zipe==NULL){printf("FAILED TO open zipe file.n");exit(1);}
if(fgetc(zipe)=='P'){
if(fgetc(zipe)=='K'){
printf("[FILE TYPE] ZIP FILE.NOT A ZIPEn");exit(0);
}}
char uuid[50]={0};
unsigned char readed=0;
//unsigned char encrypted=255;
while(1){
fseek(zipe,0x10L,SEEK_SET);
if(fgetc(zipe)!='$'){
break;
}
while(1){
uuid[readed]=fgetc(zipe);
if(uuid[readed]==''){break;}
readed++;
}
printf("[FILE TYPE] ZIPE FILEnUUID: %sn",uuid);
fseek(zipe,0x100L,SEEK_SET);
if(fgetc(zipe)=='P'){
if(fgetc(zipe)=='K'){
printf("Not Encrypted.n");exit(0);}}
printf("Encrypted zipe.n");exit(0);
}
printf("[FILE TYPE] Not a valid zipe file.n");exit(2);
}
          
          
          
          
Comments: