Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
technicaljicama committed Dec 17, 2022
1 parent 2a77df4 commit fb21bbd
Showing 1 changed file with 134 additions and 0 deletions.
134 changes: 134 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

unsigned char s1[] =
{
199, 254, 188, 253, 21, 141, 78, 155, 56, 118,
146, 165, 159, 135, 1, 91, 143, 16, 228, 211,
80, 149, 163, 212, 0, 29, 210, 239, 171, 24,
70, 240, 19, 145, 167, 68, 104, 130, 20, 119,
206, 162, 112, 205, 7, 196, 75, 160, 183, 99,
96, 98, 85, 236, 153, 76, 222, 71, 233, 59,
93, 66, 83, 41, 13, 48, 124, 180, 54, 246,
39, 100, 117, 58, 191, 198, 178, 94, 175, 152,
3, 242, 49, 186, 213, 88, 238, 134, 115, 90,
126, 230, 219, 35, 111, 204, 173, 185, 164, 14,
215, 79, 11, 97, 214, 46, 243, 252, 116, 53,
235, 250, 241, 179, 61, 81, 227, 189, 12, 34,
190, 221, 108, 151, 6, 105, 187, 40, 218, 237,
109, 45, 72, 65, 169, 38, 60, 42, 229, 140,
62, 208, 150, 194, 51, 28, 154, 122, 4, 15,
87, 27, 144, 170, 133, 209, 17, 216, 197, 8,
63, 131, 157, 89, 203, 174, 207, 224, 10, 84,
47, 31, 9, 26, 132, 114, 121, 142, 103, 23,
86, 193, 127, 244, 249, 220, 67, 136, 32, 232,
156, 255, 202, 125, 226, 223, 201, 57, 195, 110,
172, 251, 33, 30, 64, 95, 245, 139, 177, 74,
43, 113, 166, 25, 82, 225, 200, 18, 77, 106,
55, 50, 5, 168, 2, 184, 107, 36, 22, 92,
52, 69, 247, 217, 73, 248, 148, 128, 176, 192,
147, 137, 102, 231, 120, 181, 101, 129, 234, 138,
37, 158, 123, 182, 161, 44, 88, 144, 176, 51,
226, 221, 219, 51, 231, 178, 230, 61, 130, 244,
115, 211, 9, 211, 178, 85, 94, 57, 88, 144,
133, 65, 52, 132, 52, 132, 8, 176, 24
};

unsigned char s2[] =
{
88, 144, 176, 51, 226, 221, 219, 51, 231, 178,
230, 61, 130, 244, 115, 211, 9, 211, 178, 85,
94, 57, 88, 144, 133, 65, 52, 132, 52, 132,
8, 176, 24
};

unsigned char map[] =
{
209, 9, 203, 99, 22, 52, 35, 230, 207, 144,
241, 24, 45, 185, 15, 44, 181, 0, 138, 29,
242, 6, 155, 81, 214, 164, 101, 62, 213, 172,
7, 84, 110, 173, 118, 105, 64, 136, 114, 149,
152, 31, 248, 89, 234, 111, 80, 163, 18, 85,
135, 112, 194, 212, 1, 120, 16, 97, 132, 93,
208, 130, 76, 3, 23, 192, 245, 243, 95, 165,
66, 151, 49, 42, 168, 71, 92, 77, 147, 2,
36, 100, 48, 141, 33, 193, 43, 232, 83, 131,
133, 73, 162, 17, 55, 190, 72, 182, 246, 158,
38, 53, 4, 14, 103, 107, 195, 217, 221, 159,
235, 20, 126, 186, 115, 128, 184, 189, 250, 202,
119, 215, 200, 117, 226, 187, 227, 28, 150, 54,
169, 13, 170, 63, 199, 177, 98, 56, 11, 252,
160, 39, 123, 178, 229, 251, 201, 21, 113, 244,
27, 254, 68, 46, 90, 121, 167, 25, 253, 59,
139, 34, 161, 236, 223, 102, 74, 237, 32, 134,
61, 108, 94, 153, 67, 175, 225, 10, 239, 211,
19, 222, 148, 104, 180, 205, 106, 220, 255, 60,
125, 231, 145, 41, 37, 197, 51, 109, 122, 57,
228, 58, 79, 30, 219, 65, 86, 78, 156, 129,
233, 183, 191, 224, 154, 82, 196, 140, 127, 12,
87, 47, 171, 116, 26, 146, 69, 70, 206, 75,
188, 240, 137, 249, 176, 179, 210, 88, 8, 204,
216, 198, 218, 50, 166, 40, 238, 91, 143, 5,
174, 157, 96, 142, 247, 124
};

unsigned char key[] =
{
137, 3, 94, 57, 136, 57, 57, 101, 165, 199,
82, 101, 165, 94, 82, 5, 82, 82, 3, 137,
72, 136, 165, 196, 57, 72, 57, 72, 82, 72,
26, 94, 101, 165, 94, 243, 72, 82, 72, 82,
5, 136, 72, 199, 199, 72, 165, 82, 3, 81,
101, 243, 5, 82, 57, 57, 137, 82, 3, 5,
81, 199, 199, 81, 17
};

char *decryptGiphyApiKey()

{
char *out;
int i;

out = malloc(34);
i = 0;
do {
out[i] = s1[s2[i]];
i = i + 1;
} while (i != 33);
out[33] = '\0';
return out;
}

char* decryptSigningKey()

{
char *out;
int i;

out = malloc(66);
i = 0;
do {
out[i] = map[key[i]];
i = i + 1;
} while (i != 65);

out[65] = '\0';

return out;
}

int main() {
char *giphy = decryptGiphyApiKey();
char *sign = decryptSigningKey();

for(int i = 0; i < strlen(giphy); i++)
printf("%c",giphy[i]);

printf("\nNow the Request Signing key \n");

for(int i = 0; i < strlen(sign); i++)
printf("%c",sign[i]);

printf("\nReddit, i think this should be an easy reverse engineering exercise, not the protection for your beloved app\n");
}

0 comments on commit fb21bbd

Please sign in to comment.