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