Created
April 21, 2015 07:07
-
-
Save kodonokami/80c127ddabbcda96c3a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* coder: kodo no kami | |
* face: www.facebook.com/hacker.fts315 | |
* date: 21/04/2015 | |
**/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv){ | |
int salvar = 0; | |
long long int tam =0, cont = 0; | |
FILE *arq, *arq2; | |
char novo, ultimo; | |
printf("=============================\n" \ | |
" FTS ChromeExt Reverse\n" \ | |
"=============================\n\n"); | |
if(argc < 3) | |
{ | |
printf("coder: kodo no kami\nface: www.facebook.com/hacker.fts315\n\nsintaxe: program <extension.crx> <output.zip>\n\nexemple: ./fts \"kodo.crx\" \"kodo.zip\"\n\n"); | |
return 0;; | |
} | |
arq = fopen(argv[1],"r"); | |
arq2 = fopen(argv[2],"w"); | |
fseek(arq,0,SEEK_END); | |
tam = ftell(arq); | |
fseek(arq,0,SEEK_SET); | |
while(cont < tam){ | |
novo = fgetc(arq); | |
if(novo == 'K' && ultimo == 'P' && salvar == 0){ | |
salvar = 1; | |
putc('P',arq2); | |
} | |
if(salvar == 1){ | |
putc(novo,arq2); | |
} | |
ultimo = novo; | |
cont++; | |
} | |
printf("extension decompiled!!!\n\n"); | |
fclose(arq); | |
fclose(arq2); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment