style
[RRG-proxmark3.git] / client / src / proxmark3.h
blobf9f74857452e9e4b07762793e195ef80524f04d0
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 // Main binary
17 //-----------------------------------------------------------------------------
19 #ifndef PROXMARK3_H__
20 #define PROXMARK3_H__
22 #include <unistd.h>
23 #include "common.h"
25 #define PROXPROMPT_MAX_SIZE 255
27 #define PROXPROMPT_COMPOSE "[" "%s%s%s" "] pm3 --> "
29 #define PROXPROMPT_CTX_SCRIPTFILE "|" _RL_GREEN_("script")
30 #define PROXPROMPT_CTX_SCRIPTCMD "|" _RL_GREEN_("script")
31 #define PROXPROMPT_CTX_STDIN "|" _RL_GREEN_("script")
32 #define PROXPROMPT_CTX_INTERACTIVE ""
34 #define PROXPROMPT_DEV_USB _RL_BOLD_GREEN_("usb")
35 #define PROXPROMPT_DEV_FPC _RL_BOLD_GREEN_("fpc")
36 #define PROXPROMPT_DEV_OFFLINE _RL_BOLD_RED_("offline")
38 #define PROXPROMPT_NET_TCPV4 "|" _RL_BOLD_GREEN_("tcp")
39 #define PROXPROMPT_NET_UDPV4 "|" _RL_BOLD_GREEN_("udp")
40 #define PROXPROMPT_NET_TCPV6 "|" _RL_BOLD_GREEN_("tcp v6")
41 #define PROXPROMPT_NET_UDPV6 "|" _RL_BOLD_GREEN_("udp v6")
42 #define PROXPROMPT_NET_NONE ""
45 #define PROXHISTORY "history.txt"
46 #define PROXLOG "log_%Y%m%d%H%M%S.txt"
47 #define MAX_NESTED_CMDSCRIPT 10
48 #define MAX_NESTED_LUASCRIPT 10
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
54 // Load all settings into memory (struct)
55 #ifdef _WIN32
56 #include <direct.h>
57 #define GetCurrentDir _getcwd
58 #else
59 #define GetCurrentDir getcwd
60 #endif
62 int push_cmdscriptfile(char *path, bool stayafter);
63 const char *get_my_executable_path(void);
64 const char *get_my_executable_directory(void);
65 const char *get_my_user_directory(void);
66 void pm3_init(void);
67 void main_loop(const char *script_cmds_file, char *script_cmd, bool stayInCommandLoop);
69 #ifdef __cplusplus
71 #endif
73 #endif