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