Commit 61aa701b by developer29

Added Value block and Sector trailer write options

parent 172fd0e9
......@@ -134,3 +134,34 @@
<sys/time.h>
<sys/ioctl.h>
1570713472 source:c:\users\konferencija\desktop\projekti\ufr-mf-examples-c\src\main.cpp
<iostream>
<conio.h>
<windows.h>
<unistd.h>
<termios.h>
"../src/ufr.h"
1570713472 c:\users\konferencija\desktop\projekti\ufr-mf-examples-c\src\ufr.h
<string>
<iostream>
<sstream>
<cstring>
<string.h>
"../lib/include/uFCoder.h"
1570708236 c:\users\konferencija\desktop\projekti\ufr-mf-examples-c\lib\include\ufcoder.h
<stdint.h>
<stddef.h>
<jni.h>
1570713990 source:c:\users\konferencija\desktop\projekti\ufr-mf-examples-c\src\ufr.cpp
"../src/ufr.h"
<conio.h>
<windows.h>
<unistd.h>
<termios.h>
<sys/types.h>
<sys/time.h>
<sys/ioctl.h>
......@@ -2,19 +2,19 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Release" />
<File name="src\ufr.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\ufr.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13540" topLine="535" />
<Cursor1 position="1344" topLine="7" />
</Cursor>
</File>
<File name="src\ufr.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="836" topLine="0" />
<Cursor1 position="2476" topLine="77" />
</Cursor>
</File>
<File name="src\main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="src\ufr.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2710" topLine="120" />
<Cursor1 position="44679" topLine="1503" />
</Cursor>
</File>
</CodeBlocks_layout_file>
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -204,35 +204,100 @@ void menu(char key)
break;
case '6':
operation_BlockWrite();
operation_BlockInSectorRead();
printf("--------------------------------------------------\n");
break;
case '7':
operation_LinearRead();
operation_BlockWrite();
printf("--------------------------------------------------\n");
break;
case '8':
operation_LinearWrite();
operation_BlockInSectorWrite();
printf("--------------------------------------------------\n");
break;
case '9':
operation_LinearRead();
printf("--------------------------------------------------\n");
break;
case 'a':
case 'A':
operation_ReaderKeyWriteAes();
operation_LinearWrite();
printf("--------------------------------------------------\n");
break;
case 'b':
case 'B':
operation_ValueBlockRead();
printf("--------------------------------------------------\n");
break;
case 'c':
case 'C':
operation_ValueBlockWrite();
printf("--------------------------------------------------\n");
break;
case 'd':
case 'D':
operation_ValueBlockIncrement();
printf("--------------------------------------------------\n");
break;
case 'e':
case 'E':
operation_ValueBlockDecrement();
printf("--------------------------------------------------\n");
break;
case 'b':
case 'B':
case 'k':
case 'K':
operation_ReaderKeyWriteAes();
printf("--------------------------------------------------\n");
break;
case 'f':
case 'F':
operation_ValueBlockInSectorRead();
printf("--------------------------------------------------\n");
break;
case 'g':
case 'G':
operation_ValueBlockInSectorWrite();
printf("--------------------------------------------------\n");
break;
case 'h':
case 'H':
operation_ValueBlockInSectorIncrement();
printf("--------------------------------------------------\n");
break;
case 'i':
case 'I':
operation_ValueBlockInSectorDecrement();
printf("--------------------------------------------------\n");
break;
case 'l':
case 'L':
operation_ReaderKeyWrite();
printf("--------------------------------------------------\n");
break;
case 'c':
case 'C':
operation_SamKeyWrite();
case 'j':
case 'J':
operation_SectorTrailerWrite();
printf("--------------------------------------------------\n");
break;
case 'm':
case 'M':
operation_SamKeyWrite();
printf("--------------------------------------------------\n");
break;
......
......@@ -16,16 +16,27 @@ void ConvertStringToUint8Array(std::string str, uint8_t *array);
string eraseDelimiters(string hexStr);
bool isHexChar(char c);
string ConvertToHexArray(const uint8_t *data, int len, string delimiter);
void printCurrentAuthConfig();
void printCurrentAuthConfig(void);
void usage(void);
void operation_BlockRead();
void operation_BlockWrite();
void operation_LinearRead();
void operation_LinearWrite();
void operation_ReaderKeyWrite();
void operation_ReaderKeyWriteAes();
bool isCardMifarePlus();
void operation_BlockRead(void);
void operation_BlockInSectorRead(void);
void operation_BlockWrite(void);
void operation_BlockInSectorWrite(void);
void operation_LinearRead(void);
void operation_LinearWrite(void);
void operation_ReaderKeyWrite(void);
void operation_ReaderKeyWriteAes(void);
bool isCardMifarePlus(void);
void operation_SamKeyWrite(void);
void operation_ValueBlockRead(void);
void operation_ValueBlockWrite(void);
void operation_ValueBlockIncrement(void);
void operation_ValueBlockDecrement(void);
void operation_ValueBlockInSectorRead(void);
void operation_ValueBlockInSectorWrite(void);
void operation_ValueBlockInSectorIncrement(void);
void operation_ValueBlockInSectorDecrement(void);
void operation_SectorTrailerWrite(void);
#if linux || __linux__ || __APPLE__
int _kbhit(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment