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