e5b09c7c53ef4857daa893826549e4cb53ef7431
[hashcat.git] / include / types.h
1 /**
2 * Author......: Jens Steube <jens.steube@gmail.com>
3 * License.....: MIT
4 */
5
6 #ifndef TYPES_H
7 #define TYPES_H
8
9 typedef struct
10 {
11 uint salt_buf[16];
12 uint salt_buf_pc[8];
13
14 uint salt_len;
15 uint salt_iter;
16 uint salt_sign[2];
17
18 uint keccak_mdlen;
19 uint truecrypt_mdlen;
20
21 uint digests_cnt;
22 uint digests_done;
23
24 uint digests_offset;
25
26 uint scrypt_N;
27 uint scrypt_r;
28 uint scrypt_p;
29 uint scrypt_tmto;
30 uint scrypt_phy;
31
32 } salt_t;
33
34 typedef struct
35 {
36 uint iv[4];
37
38 } rar5_t;
39
40 typedef struct
41 {
42 int V;
43 int R;
44 int P;
45
46 int enc_md;
47
48 uint id_buf[8];
49 uint u_buf[32];
50 uint o_buf[32];
51
52 int id_len;
53 int o_len;
54 int u_len;
55
56 uint rc4key[2];
57 uint rc4data[2];
58
59 } pdf_t;
60
61 typedef struct
62 {
63 uint pke[25];
64 uint eapol[64];
65 int eapol_size;
66 int keyver;
67
68 } wpa_t;
69
70 typedef struct
71 {
72 uint cry_master_buf[64];
73 uint ckey_buf[64];
74 uint public_key_buf[64];
75
76 uint cry_master_len;
77 uint ckey_len;
78 uint public_key_len;
79
80 } bitcoin_wallet_t;
81
82 typedef struct
83 {
84 uint salt_buf[30];
85 uint salt_len;
86
87 uint esalt_buf[38];
88 uint esalt_len;
89
90 } sip_t;
91
92 typedef struct
93 {
94 uint data[384];
95
96 } androidfde_t;
97
98 typedef struct
99 {
100 uint nr_buf[16];
101 uint nr_len;
102
103 uint msg_buf[128];
104 uint msg_len;
105
106 } ikepsk_t;
107
108 typedef struct
109 {
110 uint user_len;
111 uint domain_len;
112 uint srvchall_len;
113 uint clichall_len;
114
115 uint userdomain_buf[64];
116 uint chall_buf[256];
117
118 } netntlm_t;
119
120 typedef struct
121 {
122 uint user[16];
123 uint realm[16];
124 uint salt[32];
125 uint timestamp[16];
126 uint checksum[4];
127
128 } krb5pa_t;
129
130 typedef struct
131 {
132 uint salt_buf[16];
133 uint data_buf[112];
134 uint keyfile_buf[16];
135
136 } tc_t;
137
138 typedef struct
139 {
140 uint salt_buf[16];
141
142 } pbkdf2_md5_t;
143
144 typedef struct
145 {
146 uint salt_buf[16];
147
148 } pbkdf2_sha1_t;
149
150 typedef struct
151 {
152 uint salt_buf[16];
153
154 } pbkdf2_sha256_t;
155
156 typedef struct
157 {
158 uint salt_buf[32];
159
160 } pbkdf2_sha512_t;
161
162 typedef struct
163 {
164 u8 cipher[1040];
165
166 } agilekey_t;
167
168 typedef struct
169 {
170 uint salt_buf[128];
171 uint salt_len;
172
173 } rakp_t;
174
175 typedef struct
176 {
177 uint data_len;
178 uint data_buf[512];
179
180 } cloudkey_t;
181
182 typedef struct
183 {
184 uint encryptedVerifier[4];
185 uint encryptedVerifierHash[5];
186
187 uint keySize;
188
189 } office2007_t;
190
191 typedef struct
192 {
193 uint encryptedVerifier[4];
194 uint encryptedVerifierHash[8];
195
196 } office2010_t;
197
198 typedef struct
199 {
200 uint encryptedVerifier[4];
201 uint encryptedVerifierHash[8];
202
203 } office2013_t;
204
205 typedef struct
206 {
207 uint version;
208 uint encryptedVerifier[4];
209 uint encryptedVerifierHash[4];
210 uint rc4key[2];
211
212 } oldoffice01_t;
213
214 typedef struct
215 {
216 uint version;
217 uint encryptedVerifier[4];
218 uint encryptedVerifierHash[5];
219 uint rc4key[2];
220
221 } oldoffice34_t;
222
223 typedef struct
224 {
225 uint P[256];
226
227 } scrypt_tmp_t;
228
229 typedef struct
230 {
231 uint digest[4];
232 uint out[4];
233
234 } pdf14_tmp_t;
235
236 typedef struct
237 {
238 union
239 {
240 uint dgst32[16];
241 u64 dgst64[8];
242 } d;
243
244 uint dgst_len;
245 uint W_len;
246
247 } pdf17l8_tmp_t;
248
249 typedef struct
250 {
251 uint digest_buf[4];
252
253 } phpass_tmp_t;
254
255 typedef struct
256 {
257 uint digest_buf[4];
258
259 } md5crypt_tmp_t;
260
261 typedef struct
262 {
263 u64 l_alt_result[8];
264
265 u64 l_p_bytes[2];
266 u64 l_s_bytes[2];
267
268 } sha512crypt_tmp_t;
269
270 typedef struct
271 {
272 uint alt_result[8];
273
274 uint p_bytes[4];
275 uint s_bytes[4];
276
277 } sha256crypt_tmp_t;
278
279 typedef struct
280 {
281 uint ipad[5];
282 uint opad[5];
283
284 uint dgst[10];
285 uint out[10];
286
287 } wpa_tmp_t;
288
289 typedef struct
290 {
291 u64 dgst[8];
292
293 } bitcoin_wallet_tmp_t;
294
295 typedef struct
296 {
297 uint ipad[5];
298 uint opad[5];
299
300 uint dgst[5];
301 uint out[4];
302
303 } dcc2_tmp_t;
304
305 typedef struct
306 {
307 uint E[18];
308
309 uint P[18];
310
311 uint S0[256];
312 uint S1[256];
313 uint S2[256];
314 uint S3[256];
315
316 } bcrypt_tmp_t;
317
318 typedef struct
319 {
320 uint digest[2];
321
322 uint P[18];
323
324 uint S0[256];
325 uint S1[256];
326 uint S2[256];
327 uint S3[256];
328
329 } pwsafe2_tmp_t;
330
331 typedef struct
332 {
333 uint digest_buf[8];
334
335 } pwsafe3_tmp_t;
336
337 typedef struct
338 {
339 uint digest_buf[5];
340
341 } androidpin_tmp_t;
342
343 typedef struct
344 {
345 uint ipad[5];
346 uint opad[5];
347
348 uint dgst[10];
349 uint out[10];
350
351 } androidfde_tmp_t;
352
353 typedef struct
354 {
355 uint ipad[16];
356 uint opad[16];
357
358 uint dgst[64];
359 uint out[64];
360
361 } tc_tmp_t;
362
363 typedef struct
364 {
365 u64 ipad[8];
366 u64 opad[8];
367
368 u64 dgst[32];
369 u64 out[32];
370
371 } tc64_tmp_t;
372
373 typedef struct
374 {
375 uint ipad[5];
376 uint opad[5];
377
378 uint dgst[5];
379 uint out[5];
380
381 } agilekey_tmp_t;
382
383 typedef struct
384 {
385 uint ipad[5];
386 uint opad[5];
387
388 uint dgst1[5];
389 uint out1[5];
390
391 uint dgst2[5];
392 uint out2[5];
393
394 } mywallet_tmp_t;
395
396 typedef struct
397 {
398 uint ipad[5];
399 uint opad[5];
400
401 uint dgst[5];
402 uint out[5];
403
404 } sha1aix_tmp_t;
405
406 typedef struct
407 {
408 uint ipad[8];
409 uint opad[8];
410
411 uint dgst[8];
412 uint out[8];
413
414 } sha256aix_tmp_t;
415
416 typedef struct
417 {
418 u64 ipad[8];
419 u64 opad[8];
420
421 u64 dgst[8];
422 u64 out[8];
423
424 } sha512aix_tmp_t;
425
426 typedef struct
427 {
428 uint ipad[8];
429 uint opad[8];
430
431 uint dgst[8];
432 uint out[8];
433
434 } lastpass_tmp_t;
435
436 typedef struct
437 {
438 u64 digest_buf[8];
439
440 } drupal7_tmp_t;
441
442 typedef struct
443 {
444 uint ipad[5];
445 uint opad[5];
446
447 uint dgst[5];
448 uint out[5];
449
450 } lotus8_tmp_t;
451
452 typedef struct
453 {
454 uint out[5];
455
456 } office2007_tmp_t;
457
458 typedef struct
459 {
460 uint out[5];
461
462 } office2010_tmp_t;
463
464 typedef struct
465 {
466 u64 out[8];
467
468 } office2013_tmp_t;
469
470 typedef struct
471 {
472 uint digest_buf[5];
473
474 } saph_sha1_tmp_t;
475
476 typedef struct
477 {
478 u32 ipad[4];
479 u32 opad[4];
480
481 u32 dgst[32];
482 u32 out[32];
483
484 } pbkdf2_md5_tmp_t;
485
486 typedef struct
487 {
488 u32 ipad[5];
489 u32 opad[5];
490
491 u32 dgst[32];
492 u32 out[32];
493
494 } pbkdf2_sha1_tmp_t;
495
496 typedef struct
497 {
498 u32 ipad[8];
499 u32 opad[8];
500
501 u32 dgst[32];
502 u32 out[32];
503
504 } pbkdf2_sha256_tmp_t;
505
506 typedef struct
507 {
508 u64 ipad[8];
509 u64 opad[8];
510
511 u64 dgst[16];
512 u64 out[16];
513
514 } pbkdf2_sha512_tmp_t;
515
516 typedef struct
517 {
518 u64 out[8];
519
520 } ecryptfs_tmp_t;
521
522 typedef struct
523 {
524 u64 ipad[8];
525 u64 opad[8];
526
527 u64 dgst[16];
528 u64 out[16];
529
530 } oraclet_tmp_t;
531
532 typedef struct
533 {
534 uint block[16];
535
536 uint dgst[8];
537
538 uint block_len;
539 uint final_len;
540
541 } seven_zip_tmp_t;
542
543 typedef struct
544 {
545 uint Kc[16];
546 uint Kd[16];
547
548 uint iv[2];
549
550 } bsdicrypt_tmp_t;
551
552 typedef struct
553 {
554 uint dgst[17][5];
555
556 } rar3_tmp_t;
557
558 typedef struct
559 {
560 uint user[16];
561
562 } cram_md5_t;
563
564 typedef struct
565 {
566 uint iv_buf[4];
567 uint iv_len;
568
569 uint salt_buf[4];
570 uint salt_len;
571
572 uint crc;
573
574 uint data_buf[96];
575 uint data_len;
576
577 uint unpack_size;
578
579 } seven_zip_t;
580
581 typedef struct
582 {
583 u32 random[2];
584 u32 hash[5];
585 u32 salt[5]; // unused, but makes better valid check
586 u32 iv[2]; // unused, but makes better valid check
587
588 } psafe2_hdr;
589
590 typedef struct
591 {
592 char *user_name;
593 uint user_len;
594
595 } user_t;
596
597 typedef struct
598 {
599 user_t *user;
600 char *orighash;
601
602 } hashinfo_t;
603
604 typedef struct
605 {
606 void *digest;
607 salt_t *salt;
608 void *esalt;
609 int cracked;
610 hashinfo_t *hash_info;
611
612 } hash_t;
613
614 typedef struct
615 {
616 uint key;
617 u64 val;
618
619 } hcstat_table_t;
620
621 typedef struct
622 {
623 uint cs_buf[0x100];
624 uint cs_len;
625
626 } cs_t;
627
628 typedef struct
629 {
630 char essid[36];
631
632 u8 mac1[6];
633 u8 mac2[6];
634 u8 nonce1[32];
635 u8 nonce2[32];
636
637 u8 eapol[256];
638 int eapol_size;
639
640 int keyver;
641 u8 keymic[16];
642
643 } hccap_t;
644
645 typedef struct
646 {
647 char signature[4];
648 u32 salt_buf[8];
649 u32 iterations;
650 u32 hash_buf[8];
651
652 } psafe3_t;
653
654 typedef struct
655 {
656 char plain_buf[256];
657 int plain_len;
658
659 hash_t hash;
660
661 } pot_t;
662
663 typedef struct
664 {
665 u64 cnt;
666
667 #ifdef _POSIX
668 struct stat stat;
669 #endif
670
671 #ifdef _WIN
672 struct __stat64 stat;
673 #endif
674
675 } dictstat_t;
676
677 typedef struct
678 {
679 uint len;
680
681 char buf[0x100];
682
683 } cpu_rule_t;
684
685 typedef struct
686 {
687 uint cmds[0x100];
688
689 } kernel_rule_t;
690
691 typedef struct
692 {
693 union
694 {
695 u8 hc4[4][ 64];
696 u32 hi4[4][ 16];
697 u64 hl4[4][ 8];
698
699 u8 hc2[2][128];
700 u32 hi2[2][ 32];
701 u64 hl2[2][ 16];
702
703 u8 hc1[1][256];
704 u32 hi1[1][ 64];
705 u64 hl1[1][ 32];
706 } h;
707
708 uint pw_len;
709 uint alignment_placeholder_1;
710 uint alignment_placeholder_2;
711 uint alignment_placeholder_3;
712
713 } pw_t;
714
715 typedef struct
716 {
717 uint i;
718
719 } bf_t;
720
721 typedef struct
722 {
723 uint b[32];
724
725 } bs_word_t;
726
727 typedef struct
728 {
729 uint i[8];
730
731 uint pw_len;
732
733 } comb_t;
734
735 typedef struct
736 {
737 pw_t pw_buf;
738
739 uint cnt;
740
741 } pw_cache_t;
742
743 typedef struct
744 {
745 u32 version_bin;
746 char cwd[1024];
747 u32 pid;
748
749 u32 dictpos;
750 u32 maskpos;
751
752 u64 words_cur;
753
754 u32 argc;
755 char **argv;
756
757 } restore_data_t;
758
759 typedef struct
760 {
761 char *file_name;
762 long seek;
763 time_t ctime;
764
765 } outfile_data_t;
766
767 typedef struct
768 {
769 char *buf;
770 u32 incr;
771 u32 avail;
772 u32 cnt;
773 u32 pos;
774
775 } wl_data_t;
776
777 typedef struct
778 {
779 uint bitmap_shift;
780 uint collisions;
781
782 } bitmap_result_t;
783
784 #define CPT_BUF 0x20000
785
786 typedef struct
787 {
788 uint cracked;
789 time_t timestamp;
790
791 } cpt_t;
792
793 /*
794 typedef struct
795 {
796 uint plain_buf[16];
797 uint plain_len;
798
799 } plain_t;
800 */
801
802 typedef struct
803 {
804 uint gidvid;
805 uint il_pos;
806
807 } plain_t;
808
809 typedef struct
810 {
811 uint word_buf[16];
812
813 } wordl_t;
814
815 typedef struct
816 {
817 uint word_buf[1];
818
819 } wordr_t;
820
821 typedef struct
822 {
823 char *device_name;
824 char *alias_name;
825
826 } tuning_db_alias_t;
827
828 typedef struct
829 {
830 char *device_name;
831 int attack_mode;
832 int hash_type;
833 int workload_profile;
834 int vector_width;
835 int kernel_accel;
836 int kernel_loops;
837
838 } tuning_db_entry_t;
839
840 typedef struct
841 {
842 tuning_db_alias_t *alias_buf;
843 int alias_cnt;
844
845 tuning_db_entry_t *entry_buf;
846 int entry_cnt;
847
848 } tuning_db_t;
849
850 #define RULES_MAX 256
851 #define PW_MIN 0
852 #define PW_MAX 54
853 #define PW_MAX1 (PW_MAX + 1)
854 #define PW_DICTMAX 31
855 #define PW_DICTMAX1 (PW_DICTMAX + 1)
856 #define PARAMCNT 32
857
858 struct __hc_device_param
859 {
860 cl_device_id device;
861 cl_device_type device_type;
862
863 uint device_id;
864 uint platform_devices_id; // for mapping with hms devices
865
866 bool skipped;
867
868 uint sm_major;
869 uint sm_minor;
870 uint kernel_exec_timeout;
871
872 uint device_processors;
873 uint device_processor_cores;
874 u64 device_maxmem_alloc;
875 u64 device_global_mem;
876 u32 device_maxclock_frequency;
877
878 uint vector_width;
879
880 uint kernel_threads;
881 uint kernel_loops;
882 uint kernel_accel;
883 uint kernel_loops_min;
884 uint kernel_loops_max;
885 uint kernel_accel_min;
886 uint kernel_accel_max;
887 uint kernel_power;
888 uint kernel_power_user;
889
890 uint size_pws;
891 uint size_tmps;
892 uint size_hooks;
893 uint size_root_css;
894 uint size_markov_css;
895 uint size_digests;
896 uint size_salts;
897 uint size_shown;
898 uint size_results;
899 uint size_plains;
900
901 uint (*pw_add) (struct __hc_device_param *, const u8 *, const uint);
902
903 void (*pw_transpose) (const pw_t *, pw_t *);
904
905 FILE *combs_fp;
906 comb_t *combs_buf;
907
908 void *hooks_buf;
909
910 pw_cache_t *pw_caches;
911
912 pw_t *pws_buf;
913 uint pws_cnt;
914 u64 pw_cnt;
915
916 u64 words_off;
917 u64 words_done;
918
919 uint *result;
920
921 uint outerloop_pos;
922 uint outerloop_left;
923
924 uint innerloop_pos;
925 uint innerloop_left;
926
927 uint exec_pos;
928 double exec_ms[EXEC_CACHE];
929
930 uint speed_pos;
931 u64 speed_cnt[SPEED_CACHE];
932 float speed_ms[SPEED_CACHE];
933
934 hc_timer_t speed_rec[SPEED_CACHE];
935
936 hc_timer_t timer_speed;
937
938 // device specific attributes starting
939
940 char *device_name;
941 char *device_name_chksum;
942 char *device_version;
943 char *driver_version;
944
945 bool opencl_v12;
946
947 cl_uint vendor_id;
948
949 cl_kernel kernel1;
950 cl_kernel kernel12;
951 cl_kernel kernel2;
952 cl_kernel kernel23;
953 cl_kernel kernel3;
954 cl_kernel kernel_mp;
955 cl_kernel kernel_mp_l;
956 cl_kernel kernel_mp_r;
957 cl_kernel kernel_amp;
958 cl_kernel kernel_tb;
959 cl_kernel kernel_tm;
960 cl_kernel kernel_weak;
961
962 cl_context context;
963
964 cl_program program;
965 cl_program program_mp;
966 cl_program program_amp;
967 cl_program program_weak;
968
969 cl_command_queue command_queue;
970
971 cl_mem d_pws_buf;
972 cl_mem d_pws_amp_buf;
973 cl_mem d_words_buf_l;
974 cl_mem d_words_buf_r;
975 cl_mem d_rules;
976 cl_mem d_rules_c;
977 cl_mem d_combs;
978 cl_mem d_combs_c;
979 cl_mem d_bfs;
980 cl_mem d_bfs_c;
981 cl_mem d_tm_c;
982 cl_mem d_bitmap_s1_a;
983 cl_mem d_bitmap_s1_b;
984 cl_mem d_bitmap_s1_c;
985 cl_mem d_bitmap_s1_d;
986 cl_mem d_bitmap_s2_a;
987 cl_mem d_bitmap_s2_b;
988 cl_mem d_bitmap_s2_c;
989 cl_mem d_bitmap_s2_d;
990 cl_mem d_plain_bufs;
991 cl_mem d_digests_buf;
992 cl_mem d_digests_shown;
993 cl_mem d_salt_bufs;
994 cl_mem d_esalt_bufs;
995 cl_mem d_bcrypt_bufs;
996 cl_mem d_tmps;
997 cl_mem d_hooks;
998 cl_mem d_result;
999 cl_mem d_scryptV_buf;
1000 cl_mem d_root_css_buf;
1001 cl_mem d_markov_css_buf;
1002
1003 void *kernel_params[PARAMCNT];
1004 void *kernel_params_mp[PARAMCNT];
1005 void *kernel_params_mp_r[PARAMCNT];
1006 void *kernel_params_mp_l[PARAMCNT];
1007 void *kernel_params_amp[PARAMCNT];
1008 void *kernel_params_tb[PARAMCNT];
1009 void *kernel_params_tm[PARAMCNT];
1010
1011 u32 kernel_params_buf32[PARAMCNT];
1012
1013 u32 kernel_params_mp_buf32[PARAMCNT];
1014 u64 kernel_params_mp_buf64[PARAMCNT];
1015
1016 u32 kernel_params_mp_r_buf32[PARAMCNT];
1017 u64 kernel_params_mp_r_buf64[PARAMCNT];
1018
1019 u32 kernel_params_mp_l_buf32[PARAMCNT];
1020 u64 kernel_params_mp_l_buf64[PARAMCNT];
1021
1022 u32 kernel_params_amp_buf32[PARAMCNT];
1023 };
1024
1025 typedef struct __hc_device_param hc_device_param_t;
1026
1027 #ifdef HAVE_HWMON
1028 typedef struct
1029 {
1030 union
1031 {
1032 #ifdef HAVE_ADL
1033 HM_ADAPTER_AMD amd;
1034 #endif
1035
1036 #if defined(HAVE_NVML) || defined(HAVE_NVAPI)
1037 HM_ADAPTER_NV nv;
1038 #endif
1039
1040 } adapter_index;
1041
1042 int od_version;
1043 int fan_supported;
1044
1045 // int busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1046 // int devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1047
1048 } hm_attrs_t;
1049 #endif // HAVE_HWMON
1050
1051 typedef struct
1052 {
1053 /**
1054 * threads
1055 */
1056
1057 uint devices_status;
1058 uint devices_cnt;
1059 uint devices_active;
1060
1061 hc_device_param_t *devices_param;
1062
1063 /**
1064 * workload specific
1065 */
1066
1067 uint kernel_power_all;
1068 float kernel_power_div;
1069
1070 /**
1071 * attack specific
1072 */
1073
1074 uint wordlist_mode;
1075 uint hashlist_mode;
1076 uint hashlist_format;
1077
1078 uint attack_mode;
1079 uint attack_kern;
1080 uint attack_exec;
1081
1082 uint kernel_rules_cnt;
1083
1084 kernel_rule_t *kernel_rules_buf;
1085
1086 uint combs_mode;
1087 uint combs_cnt;
1088
1089 uint bfs_cnt;
1090
1091 uint css_cnt;
1092 cs_t *css_buf;
1093
1094 cs_t *root_css_buf;
1095 cs_t *markov_css_buf;
1096
1097 char *rule_buf_l;
1098 char *rule_buf_r;
1099 int rule_len_l;
1100 int rule_len_r;
1101
1102 /**
1103 * opencl library stuff
1104 */
1105
1106 void *ocl;
1107
1108 /**
1109 * hardware watchdog
1110 */
1111
1112 #ifdef HAVE_HWMON
1113 void *hm_nv;
1114 void *hm_amd;
1115 hm_attrs_t hm_device[DEVICES_MAX];
1116 #endif
1117
1118 /**
1119 * hashes
1120 */
1121
1122 uint digests_cnt;
1123 uint digests_done;
1124 uint digests_saved;
1125
1126 void *digests_buf;
1127 uint *digests_shown;
1128 uint *digests_shown_tmp;
1129
1130 uint salts_cnt;
1131 uint salts_done;
1132
1133 salt_t *salts_buf;
1134 uint *salts_shown;
1135
1136 void *esalts_buf;
1137
1138 /**
1139 * logging
1140 */
1141
1142 uint logfile_disable;
1143 char *logfile;
1144 char *topid;
1145 char *subid;
1146
1147 /**
1148 * crack-per-time
1149 */
1150
1151 cpt_t cpt_buf[CPT_BUF];
1152 int cpt_pos;
1153 time_t cpt_start;
1154 u64 cpt_total;
1155
1156 /**
1157 * user
1158 */
1159
1160 char *dictfile;
1161 char *dictfile2;
1162 char *mask;
1163 uint maskcnt;
1164 uint maskpos;
1165 char *session;
1166 char separator;
1167 char *hashfile;
1168 char *homedir;
1169 char *install_dir;
1170 char *profile_dir;
1171 char *session_dir;
1172 char *shared_dir;
1173 char *outfile;
1174 uint outfile_format;
1175 uint outfile_autohex;
1176 uint outfile_check_timer;
1177 char *eff_restore_file;
1178 char *new_restore_file;
1179 char *induction_directory;
1180 char *outfile_check_directory;
1181 uint loopback;
1182 char *loopback_file;
1183 uint restore;
1184 uint restore_timer;
1185 uint restore_disable;
1186 uint status;
1187 uint status_timer;
1188 uint status_automat;
1189 uint quiet;
1190 uint force;
1191 uint benchmark;
1192 uint runtime;
1193 uint remove;
1194 uint remove_timer;
1195 uint debug_mode;
1196 char *debug_file;
1197 uint hex_charset;
1198 uint hex_salt;
1199 uint hex_wordlist;
1200 uint pw_min;
1201 uint pw_max;
1202 uint powertune_enable;
1203 uint scrypt_tmto;
1204 uint segment_size;
1205 char *truecrypt_keyfiles;
1206 uint workload_profile;
1207
1208 uint hash_mode;
1209 uint hash_type;
1210 uint kern_type;
1211 uint opts_type;
1212 uint salt_type;
1213 uint esalt_size;
1214 uint isSalted;
1215 uint dgst_size;
1216 uint opti_type;
1217 uint dgst_pos0;
1218 uint dgst_pos1;
1219 uint dgst_pos2;
1220 uint dgst_pos3;
1221
1222 #ifdef HAVE_HWMON
1223 uint gpu_temp_disable;
1224 uint gpu_temp_abort;
1225 uint gpu_temp_retain;
1226 #endif
1227
1228 char **rp_files;
1229 uint rp_files_cnt;
1230 uint rp_gen;
1231 uint rp_gen_seed;
1232
1233 FILE *pot_fp;
1234
1235 /**
1236 * used for restore
1237 */
1238
1239 u64 skip;
1240 u64 limit;
1241
1242 restore_data_t *rd;
1243
1244 u64 checkpoint_cur_words; // used for the "stop at next checkpoint" feature
1245
1246 /**
1247 * status, timer
1248 */
1249
1250 time_t runtime_start;
1251 time_t runtime_stop;
1252
1253 time_t proc_start;
1254 time_t proc_stop;
1255
1256 u64 words_cnt;
1257 u64 words_cur;
1258 u64 words_base;
1259
1260 u64 *words_progress_done; // progress number of words done per salt
1261 u64 *words_progress_rejected; // progress number of words rejected per salt
1262 u64 *words_progress_restored; // progress number of words restored per salt
1263
1264 hc_timer_t timer_running; // timer on current dict
1265 hc_timer_t timer_paused; // timer on current dict
1266
1267 float ms_paused; // timer on current dict
1268
1269 /**
1270 * hash_info and username
1271 */
1272
1273 hashinfo_t **hash_info;
1274 uint username;
1275
1276 int (*sort_by_digest) (const void *, const void *);
1277
1278 int (*parse_func) (char *, uint, hash_t *);
1279
1280 } hc_global_data_t;
1281
1282 extern hc_global_data_t data;
1283
1284 #endif