From 8d17151c9e3500082f61f43fc0eee065ba794df8 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 11 Nov 2012 14:49:21 +0000 Subject: original key don't included in clear git-svn-id: http://svn.miranda-ng.org/main/trunk@2290 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/keypacker/keypacker.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'protocols/Skype/keypacker/keypacker.cpp') diff --git a/protocols/Skype/keypacker/keypacker.cpp b/protocols/Skype/keypacker/keypacker.cpp index 6aa5b3e0c0..117fa20f93 100644 --- a/protocols/Skype/keypacker/keypacker.cpp +++ b/protocols/Skype/keypacker/keypacker.cpp @@ -147,6 +147,21 @@ int main() aes_context ctx; FILE *fin, *fout; + int t = strlen(MY_KEY); + int basecodedkey = encodeLength(strlen(MY_KEY), false); + buf = malloc(basecodedkey + 1); + unsigned char *tmpk = (unsigned char *)malloc(basecodedkey + 1); + tmpk = (unsigned char *)encode((unsigned char*)MY_KEY, strlen(MY_KEY), false); + tmpk[basecodedkey] = 0; + char *output = (char*)malloc(basecodedkey + 17); + strcpy(output, "#define MY_KEY \""); + strcat(output, (const char*)tmpk); + strcat(output, "\""); + fout = fopen("..\\..\\..\\..\\SkypeKit\\key.h", "wb"); + fputs((const char*)output, fout); + fclose(fout); + free(buf); + aes_set_key( &ctx, (BYTE*)MY_KEY, 128); //encrypt -- cgit v1.2.3