![]() |
A52HackTool 1.3.0
Turnkey & easy to use tool for cracking the GSM A5/2 cipher
|
Command-line interface for program operation. More...
#include <stdlib.h>#include <stdio.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include "const_code.h"#include "utils.h"#include "code.h"#include "keygen.h"#include "attack.h"#include "matrices_generation.h"#include "keysetup_reverse.h"Defines | |
| #define | _UNIQUE_OPERATION_TEST(opcode) |
| #define | _LOAD_SOURCE |
| #define | _LOAD_DEST |
Enumerations | |
| enum | OperationParam { OP_NONE, OP_ENCODE, OP_DECODE, OP_ENCRYPT, OP_ATTACK, OP_PRECOMPUTE, OP_AUTOTEST } |
| CLI Operation. More... | |
Functions | |
| void | displayHelp () |
| Displays the program banner and help about possible CLI commands. | |
| int | main (int argc, char *argv[]) |
| Program entry point. | |
Command-line interface for program operation.
| #define _LOAD_DEST |
destfile = fopen(param_destfile, "wb"); \ if (!destfile) { \ printf("Unable to open file [wb] '%s'\n", param_destfile); \ return 1; \ }
| #define _LOAD_SOURCE |
sourcefile = fopen(param_sourcefile, "rb"); \ if (!sourcefile) { \ printf("Unable to open file [rb] '%s'\n", param_sourcefile); \ return 1; \ } \ fseek(sourcefile, 0, SEEK_END); filesize = ftell(sourcefile); fseek(sourcefile, 0, SEEK_SET);
| #define _UNIQUE_OPERATION_TEST | ( | opcode | ) |
if (param_operation != OP_NONE) { \ printf("Error: operation field must be unique\n"); return 1; \ } \ param_operation = (opcode)
| enum OperationParam |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Program entry point.
| [in] | argc | Arguments count |
| [in] | argv | Arguments values |
References attack(), attack_test(), BINPRODUCT_VECTOR_MATRIX, BIT_VECTOR_TO_BYTE_VECTOR, BYTE_VECTOR_TO_BIT_VECTOR, cipherTextArgs::cipherText1, cipherTextArgs::cipherText2, cipherTextArgs::cipherText3, CLEARLINE, code_test(), CODEWORD_LENGTH, displayHelp(), exportAllMatrices(), fileExists(), cipherTextArgs::frameId, FRAMEID_BITS, freeRAM(), getKeystream(), initializeRAM(), keygen_test(), keysetup(), keysetup_reverse_test(), matrices_generation_test(), OP_ATTACK, OP_AUTOTEST, OP_DECODE, OP_ENCODE, OP_ENCRYPT, OP_NONE, OP_PRECOMPUTE, processFullDecoding(), processFullEncodingGMatrix(), PROGRESSBAR_NOLF, SECRETKEY_BITS, SOURCEWORD_LENGTH, stringToByteArray(), and XOR_CHARARRAYS.
1.7.4