1 /**
2  * Author......: See docs/credits.txt
3  * License.....: MIT
4  */
5 
6 #ifndef _TERMINAL_H
7 #define _TERMINAL_H
8 
9 #include <stdio.h>
10 #include <string.h>
11 #include <sys/time.h>
12 #include <sys/types.h>
13 #include <unistd.h>
14 
15 #if defined (_WIN)
16 #include <windows.h>
17 #else
18 #include <termios.h>
19 #if defined (__APPLE__)
20 #include <sys/ioctl.h>
21 #endif // __APPLE__
22 #endif // _WIN
23 
24 void welcome_screen (hashcat_ctx_t *hashcat_ctx, const char *version_tag);
25 void goodbye_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const time_t proc_stop);
26 
27 int setup_console (void);
28 
29 void send_prompt  (hashcat_ctx_t *hashcat_ctx);
30 void clear_prompt (hashcat_ctx_t *hashcat_ctx);
31 
32 HC_API_CALL void *thread_keypress (void *p);
33 
34 #if defined (_WIN)
35 void SetConsoleWindowSize (const int x);
36 #endif
37 
38 int tty_break(void);
39 int tty_getchar(void);
40 int tty_fix(void);
41 
42 void compress_terminal_line_length (char *out_buf, const size_t keep_from_beginning, const size_t keep_from_end);
43 
44 void hash_info                          (hashcat_ctx_t *hashcat_ctx);
45 
46 void backend_info                       (hashcat_ctx_t *hashcat_ctx);
47 void backend_info_compact               (hashcat_ctx_t *hashcat_ctx);
48 
49 void status_progress_machine_readable   (hashcat_ctx_t *hashcat_ctx);
50 void status_progress                    (hashcat_ctx_t *hashcat_ctx);
51 void status_speed_machine_readable      (hashcat_ctx_t *hashcat_ctx);
52 void status_speed                       (hashcat_ctx_t *hashcat_ctx);
53 void status_display_machine_readable    (hashcat_ctx_t *hashcat_ctx);
54 void status_display                     (hashcat_ctx_t *hashcat_ctx);
55 void status_benchmark_machine_readable  (hashcat_ctx_t *hashcat_ctx);
56 void status_benchmark                   (hashcat_ctx_t *hashcat_ctx);
57 
58 #endif // _TERMINAL_H
59