-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathVault.c
44 lines (33 loc) · 1.17 KB
/
Vault.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
Vault.c version 0.01
-- This program has been created, tested and executed inside C4droid app on my android phone because i don't have a computer.
-- To run this program you have to edit some code according to your preference. Read the instructions.
-- This program works best with image files(.jpg, jpeg, etc.)
-- If you have any problem then contact me on twitter @Intek13x_
*/
#include<stdio.h>
#include<stdlib.h>
int main()
{
FILE *file_input, *file_output;
int read_char, i = 0;
int xor_byte = 0x42; // Put your xor key byte here.
file_input = fopen("Sample.bin", "rb+"); // Enter the name of your encrypted file in place of "Sample.bin". Rename it if it's too long.
file_output = fopen("Sample_decrypted.jpg","wb"); // Enter the name for output file with appropriate extension(like .jpg, .png, etc..).
while((read_char = getc(file_input)) != EOF)
{
if(i < 128)
{
fputc(read_char^xor_byte, file_output);
i++;
}
else
{
fputc(read_char, file_output);
}
}
printf("Nice weather!, right.?");
fclose(file_input);
fclose(file_output);
return 0;
}