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