X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/e6ee6c4cd135c29fcd3812e0ceea8fe17497700d..26f202e22feecfe6239c152d0783bf952e64ea35:/client/loclass/cipherutils.c diff --git a/client/loclass/cipherutils.c b/client/loclass/cipherutils.c index 1e08cf10..b5e365bf 100644 --- a/client/loclass/cipherutils.c +++ b/client/loclass/cipherutils.c @@ -1,5 +1,17 @@ /***************************************************************************** - * This file is part of iClassCipher. It is a reconstructon of the cipher engine + * WARNING + * + * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY. + * + * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL + * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL, + * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES. + * + * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS. + * + ***************************************************************************** + * + * This file is part of loclass. It is a reconstructon of the cipher engine * used in iClass, and RFID techology. * * The implementation is based on the work performed by @@ -10,7 +22,7 @@ * * This is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. + * by the Free Software Foundation, or, at your option, any later version. * * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,7 +30,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with IClassCipher. If not, see . + * along with loclass. If not, see . + * + * ****************************************************************************/ #include @@ -156,6 +170,7 @@ void printarr(char * name, uint8_t* arr, int len) } cx += snprintf(output+cx,outsize-cx,"};"); prnlog(output); + free(output); } void printvar(char * name, uint8_t* arr, int len) @@ -173,6 +188,7 @@ void printvar(char * name, uint8_t* arr, int len) } prnlog(output); + free(output); } void printarr_human_readable(char * title, uint8_t* arr, int len) @@ -192,13 +208,14 @@ void printarr_human_readable(char * title, uint8_t* arr, int len) cx += snprintf(output+cx,outsize-cx, "%02x ",*(arr+i)); } prnlog(output); + free(output); } //----------------------------- // Code for testing below //----------------------------- - +#ifndef ON_DEVICE int testBitStream() { uint8_t input [] = {0xDE,0xAD,0xBE,0xEF,0xDE,0xAD,0xBE,0xEF}; @@ -271,3 +288,4 @@ int testCipherUtils(void) retval |= testReversedBitstream(); return retval; } +#endif