forked from adipinto/offline-sip-cracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobals.h
73 lines (67 loc) · 2.04 KB
/
globals.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* Copyright notice
* ================
*
* Copyright (C) 2012
* Alessandro Di Pinto <[email protected]>
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* Offline SIP Cracker is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <string.h>
#include <openssl/evp.h>
#include <getopt.h>
#include <time.h>
#include <pcap.h>
#include <regex.h>
#include <ctype.h> // import 'isdigit' function
// Constant definitions
#define TRUE 1
#define FALSE 0
#define MD5_LEN 32
#define MD5_ALGO "MD5"
// Software Version
#define VERSION "1.0"
#define AUTHOR "Alessandro Di Pinto <[email protected]>"
#define SOFT_NAME "Offline SIP Cracker"
// Global variables
short DEBUG;
short VERBOSE;
const char* REAL_FILE_NAME;
// RETURN ERROR CODE LIST
#define CMD_LINE_ERROR -1
#define EXIT_SUCCESS 0
#define EXIT_USAGE 1
#define MANDATORY_OPTION_ERROR 2
#define UNKNOWN_OPTION 3
#define NO_SESSION_TO_CRACK 4
#define MAX_SESSION_TO_CRACK 5
#define OUT_OF_SESSION 6
#define MALLOC_MEMORY_ERROR 20
#define DICT_FILENAME_ERROR 30
#define DICT_FILENAME_NULL 31
#define SIP_INFO_ERROR 32
#define OPEN_FILE_ERROR 40
#define CREATION_BLOCK_FAILED 50
#define PCAP_FILTER_ERROR 60
#define PCAP_REGEXP_ERROR 61
#define PCAP_FILENAME_ERROR 62
// Function's prototype definitions
void c_exit(int); // custom_exit
char* touppercase(char*);
void print_actual_time();
void print_start_time();
void print_end_time();