From: marshmellow42 Date: Tue, 28 Apr 2015 19:53:07 +0000 (-0400) Subject: Iceman's script aes fix #93 X-Git-Tag: v2.1.0~15^2 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/bdfb62b405a3588e4ce72e02c5e6cee7b977efdb Iceman's script aes fix #93 Thanks Iceman (note I did not have a tag to double test this one. :) --- diff --git a/client/scripting.c b/client/scripting.c index 0ccdeeec..d7f51c23 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -261,7 +261,7 @@ static int l_aes(lua_State *L) aes_context ctx; aes_init(&ctx); - aes_setkey_enc(&ctx,(const unsigned char *)p_key,128); + aes_setkey_dec(&ctx, aes_key, 128); aes_crypt_cbc(&ctx,AES_DECRYPT,sizeof(indata), iv, indata,outdata ); //Push decrypted array as a string lua_pushlstring(L,(const char *)&outdata, sizeof(outdata));