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