Initial commit
[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 random[2];
593 u32 hash[5];
594 u32 salt[5]; // unused, but makes better valid check
595 u32 iv[2]; // unused, but makes better valid check
596
597 } psafe2_hdr;
598
599 typedef struct
600 {
601 char *user_name;
602 uint user_len;
603
604 } user_t;
605
606 typedef struct
607 {
608 user_t *user;
609 char *orighash;
610
611 } hashinfo_t;
612
613 typedef struct
614 {
615 void *digest;
616 salt_t *salt;
617 void *esalt;
618 int cracked;
619 hashinfo_t *hash_info;
620
621 } hash_t;
622
623 typedef struct
624 {
625 uint key;
626 u64 val;
627
628 } hcstat_table_t;
629
630 typedef struct
631 {
632 uint cs_buf[0x100];
633 uint cs_len;
634
635 } cs_t;
636
637 typedef struct
638 {
639 char essid[36];
640
641 u8 mac1[6];
642 u8 mac2[6];
643 u8 nonce1[32];
644 u8 nonce2[32];
645
646 u8 eapol[256];
647 int eapol_size;
648
649 int keyver;
650 u8 keymic[16];
651
652 } hccap_t;
653
654 typedef struct
655 {
656 char signature[4];
657 u32 salt_buf[8];
658 u32 iterations;
659 u32 hash_buf[8];
660
661 } psafe3_t;
662
663 typedef struct
664 {
665 char plain_buf[256];
666 int plain_len;
667
668 hash_t hash;
669
670 } pot_t;
671
672 typedef struct
673 {
674 u64 cnt;
675
676 #ifdef _POSIX
677 struct stat stat;
678 #endif
679
680 #ifdef _WIN
681 struct __stat64 stat;
682 #endif
683
684 } dictstat_t;
685
686 typedef struct
687 {
688 uint len;
689
690 char buf[0x100];
691
692 } cpu_rule_t;
693
694 typedef struct
695 {
696 uint cmds[0x100];
697
698 } kernel_rule_t;
699
700 typedef struct
701 {
702 union
703 {
704 u8 hc4[4][ 64];
705 u32 hi4[4][ 16];
706 u64 hl4[4][ 8];
707
708 u8 hc2[2][128];
709 u32 hi2[2][ 32];
710 u64 hl2[2][ 16];
711
712 u8 hc1[1][256];
713 u32 hi1[1][ 64];
714 u64 hl1[1][ 32];
715 } h;
716
717 uint pw_len;
718 uint alignment_placeholder_1;
719 uint alignment_placeholder_2;
720 uint alignment_placeholder_3;
721
722 } pw_t;
723
724 typedef struct
725 {
726 uint i;
727
728 } bf_t;
729
730 typedef struct
731 {
732 uint b[32];
733
734 } bs_word_t;
735
736 typedef struct
737 {
738 uint i[8];
739
740 uint pw_len;
741
742 } comb_t;
743
744 typedef struct
745 {
746 pw_t pw_buf;
747
748 uint cnt;
749
750 } pw_cache_t;
751
752 typedef struct
753 {
754 u32 version_bin;
755 char cwd[1024];
756 u32 pid;
757
758 u32 dictpos;
759 u32 maskpos;
760
761 u64 words_cur;
762
763 u32 argc;
764 char **argv;
765
766 } restore_data_t;
767
768 typedef struct
769 {
770 char *file_name;
771 long seek;
772 time_t ctime;
773
774 } outfile_data_t;
775
776 typedef struct
777 {
778 char *buf;
779 u32 incr;
780 u32 avail;
781 u32 cnt;
782 u32 pos;
783
784 } wl_data_t;
785
786 typedef struct
787 {
788 uint bitmap_shift;
789 uint collisions;
790
791 } bitmap_result_t;
792
793 #define CPT_BUF 0x20000
794
795 typedef struct
796 {
797 uint cracked;
798 time_t timestamp;
799
800 } cpt_t;
801
802 /*
803 typedef struct
804 {
805 uint plain_buf[16];
806 uint plain_len;
807
808 } plain_t;
809 */
810
811 typedef struct
812 {
813 uint gidvid;
814 uint il_pos;
815
816 } plain_t;
817
818 typedef struct
819 {
820 uint word_buf[16];
821
822 } wordl_t;
823
824 typedef struct
825 {
826 uint word_buf[1];
827
828 } wordr_t;
829
830 typedef struct
831 {
832 char *device_name;
833 char *alias_name;
834
835 } tuning_db_alias_t;
836
837 typedef struct
838 {
839 char *device_name;
840 int attack_mode;
841 int hash_type;
842 int workload_profile;
843 int vector_width;
844 int kernel_accel;
845 int kernel_loops;
846
847 } tuning_db_entry_t;
848
849 typedef struct
850 {
851 tuning_db_alias_t *alias_buf;
852 int alias_cnt;
853
854 tuning_db_entry_t *entry_buf;
855 int entry_cnt;
856
857 } tuning_db_t;
858
859 #define RULES_MAX 256
860 #define PW_MIN 0
861 #define PW_MAX 54
862 #define PW_MAX1 (PW_MAX + 1)
863 #define PW_DICTMAX 31
864 #define PW_DICTMAX1 (PW_DICTMAX + 1)
865 #define PARAMCNT 32
866
867 struct __hc_device_param
868 {
869 cl_device_id device;
870 cl_device_type device_type;
871
872 uint device_id;
873 uint platform_devices_id; // for mapping with hms devices
874
875 bool skipped;
876
877 uint sm_major;
878 uint sm_minor;
879 uint kernel_exec_timeout;
880
881 uint device_processors;
882 uint device_processor_cores;
883 u64 device_maxmem_alloc;
884 u64 device_global_mem;
885 u32 device_maxclock_frequency;
886
887 uint vector_width;
888
889 uint kernel_threads;
890 uint kernel_loops;
891 uint kernel_accel;
892 uint kernel_loops_min;
893 uint kernel_loops_max;
894 uint kernel_accel_min;
895 uint kernel_accel_max;
896 uint kernel_power;
897 uint kernel_power_user;
898
899 uint size_pws;
900 uint size_tmps;
901 uint size_hooks;
902 uint size_root_css;
903 uint size_markov_css;
904 uint size_digests;
905 uint size_salts;
906 uint size_shown;
907 uint size_results;
908 uint size_plains;
909
910 uint (*pw_add) (struct __hc_device_param *, const u8 *, const uint);
911
912 void (*pw_transpose) (const pw_t *, pw_t *);
913
914 FILE *combs_fp;
915 comb_t *combs_buf;
916
917 void *hooks_buf;
918
919 pw_cache_t *pw_caches;
920
921 pw_t *pws_buf;
922 uint pws_cnt;
923 u64 pw_cnt;
924
925 u64 words_off;
926 u64 words_done;
927
928 uint *result;
929
930 uint outerloop_pos;
931 uint outerloop_left;
932
933 uint innerloop_pos;
934 uint innerloop_left;
935
936 uint exec_pos;
937 double exec_ms[EXEC_CACHE];
938
939 uint speed_pos;
940 u64 speed_cnt[SPEED_CACHE];
941 float speed_ms[SPEED_CACHE];
942
943 hc_timer_t speed_rec[SPEED_CACHE];
944
945 hc_timer_t timer_speed;
946
947 // device specific attributes starting
948
949 char *device_name;
950 char *device_name_chksum;
951 char *device_version;
952 char *driver_version;
953
954 bool opencl_v12;
955
956 cl_uint vendor_id;
957
958 cl_kernel kernel1;
959 cl_kernel kernel12;
960 cl_kernel kernel2;
961 cl_kernel kernel23;
962 cl_kernel kernel3;
963 cl_kernel kernel_mp;
964 cl_kernel kernel_mp_l;
965 cl_kernel kernel_mp_r;
966 cl_kernel kernel_amp;
967 cl_kernel kernel_tb;
968 cl_kernel kernel_tm;
969 cl_kernel kernel_weak;
970
971 cl_context context;
972
973 cl_program program;
974 cl_program program_mp;
975 cl_program program_amp;
976 cl_program program_weak;
977
978 cl_command_queue command_queue;
979
980 cl_mem d_pws_buf;
981 cl_mem d_pws_amp_buf;
982 cl_mem d_words_buf_l;
983 cl_mem d_words_buf_r;
984 cl_mem d_rules;
985 cl_mem d_rules_c;
986 cl_mem d_combs;
987 cl_mem d_combs_c;
988 cl_mem d_bfs;
989 cl_mem d_bfs_c;
990 cl_mem d_tm_c;
991 cl_mem d_bitmap_s1_a;
992 cl_mem d_bitmap_s1_b;
993 cl_mem d_bitmap_s1_c;
994 cl_mem d_bitmap_s1_d;
995 cl_mem d_bitmap_s2_a;
996 cl_mem d_bitmap_s2_b;
997 cl_mem d_bitmap_s2_c;
998 cl_mem d_bitmap_s2_d;
999 cl_mem d_plain_bufs;
1000 cl_mem d_digests_buf;
1001 cl_mem d_digests_shown;
1002 cl_mem d_salt_bufs;
1003 cl_mem d_esalt_bufs;
1004 cl_mem d_bcrypt_bufs;
1005 cl_mem d_tmps;
1006 cl_mem d_hooks;
1007 cl_mem d_result;
1008 cl_mem d_scryptV_buf;
1009 cl_mem d_root_css_buf;
1010 cl_mem d_markov_css_buf;
1011
1012 void *kernel_params[PARAMCNT];
1013 void *kernel_params_mp[PARAMCNT];
1014 void *kernel_params_mp_r[PARAMCNT];
1015 void *kernel_params_mp_l[PARAMCNT];
1016 void *kernel_params_amp[PARAMCNT];
1017 void *kernel_params_tb[PARAMCNT];
1018 void *kernel_params_tm[PARAMCNT];
1019
1020 u32 kernel_params_buf32[PARAMCNT];
1021
1022 u32 kernel_params_mp_buf32[PARAMCNT];
1023 u64 kernel_params_mp_buf64[PARAMCNT];
1024
1025 u32 kernel_params_mp_r_buf32[PARAMCNT];
1026 u64 kernel_params_mp_r_buf64[PARAMCNT];
1027
1028 u32 kernel_params_mp_l_buf32[PARAMCNT];
1029 u64 kernel_params_mp_l_buf64[PARAMCNT];
1030
1031 u32 kernel_params_amp_buf32[PARAMCNT];
1032 };
1033
1034 typedef struct __hc_device_param hc_device_param_t;
1035
1036 #ifdef HAVE_HWMON
1037 typedef struct
1038 {
1039 union
1040 {
1041 #ifdef HAVE_ADL
1042 HM_ADAPTER_AMD amd;
1043 #endif
1044
1045 #if defined(HAVE_NVML) || defined(HAVE_NVAPI)
1046 HM_ADAPTER_NV nv;
1047 #endif
1048
1049 } adapter_index;
1050
1051 int od_version;
1052 int fan_supported;
1053
1054 // int busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1055 // int devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1056
1057 } hm_attrs_t;
1058 #endif // HAVE_HWMON
1059
1060 typedef struct
1061 {
1062 /**
1063 * threads
1064 */
1065
1066 uint devices_status;
1067 uint devices_cnt;
1068 uint devices_active;
1069
1070 hc_device_param_t *devices_param;
1071
1072 /**
1073 * workload specific
1074 */
1075
1076 uint kernel_power_all;
1077 float kernel_power_div;
1078
1079 /**
1080 * attack specific
1081 */
1082
1083 uint wordlist_mode;
1084 uint hashlist_mode;
1085 uint hashlist_format;
1086
1087 uint attack_mode;
1088 uint attack_kern;
1089 uint attack_exec;
1090
1091 uint kernel_rules_cnt;
1092
1093 kernel_rule_t *kernel_rules_buf;
1094
1095 uint combs_mode;
1096 uint combs_cnt;
1097
1098 uint bfs_cnt;
1099
1100 uint css_cnt;
1101 cs_t *css_buf;
1102
1103 cs_t *root_css_buf;
1104 cs_t *markov_css_buf;
1105
1106 char *rule_buf_l;
1107 char *rule_buf_r;
1108 int rule_len_l;
1109 int rule_len_r;
1110
1111 /**
1112 * opencl library stuff
1113 */
1114
1115 void *ocl;
1116
1117 /**
1118 * hardware watchdog
1119 */
1120
1121 #ifdef HAVE_HWMON
1122 void *hm_nv;
1123 void *hm_amd;
1124 hm_attrs_t hm_device[DEVICES_MAX];
1125 #endif
1126
1127 /**
1128 * hashes
1129 */
1130
1131 uint digests_cnt;
1132 uint digests_done;
1133 uint digests_saved;
1134
1135 void *digests_buf;
1136 uint *digests_shown;
1137 uint *digests_shown_tmp;
1138
1139 uint salts_cnt;
1140 uint salts_done;
1141
1142 salt_t *salts_buf;
1143 uint *salts_shown;
1144
1145 void *esalts_buf;
1146
1147 /**
1148 * logging
1149 */
1150
1151 uint logfile_disable;
1152 char *logfile;
1153 char *topid;
1154 char *subid;
1155
1156 /**
1157 * crack-per-time
1158 */
1159
1160 cpt_t cpt_buf[CPT_BUF];
1161 int cpt_pos;
1162 time_t cpt_start;
1163 u64 cpt_total;
1164
1165 /**
1166 * user
1167 */
1168
1169 char *dictfile;
1170 char *dictfile2;
1171 char *mask;
1172 uint maskcnt;
1173 uint maskpos;
1174 char *session;
1175 char separator;
1176 char *hashfile;
1177 char *homedir;
1178 char *install_dir;
1179 char *profile_dir;
1180 char *session_dir;
1181 char *shared_dir;
1182 char *outfile;
1183 uint outfile_format;
1184 uint outfile_autohex;
1185 uint outfile_check_timer;
1186 char *eff_restore_file;
1187 char *new_restore_file;
1188 char *induction_directory;
1189 char *outfile_check_directory;
1190 uint loopback;
1191 char *loopback_file;
1192 uint restore;
1193 uint restore_timer;
1194 uint restore_disable;
1195 uint status;
1196 uint status_timer;
1197 uint status_automat;
1198 uint quiet;
1199 uint force;
1200 uint benchmark;
1201 uint benchmark_repeats;
1202 uint runtime;
1203 uint remove;
1204 uint remove_timer;
1205 uint debug_mode;
1206 char *debug_file;
1207 uint hex_charset;
1208 uint hex_salt;
1209 uint hex_wordlist;
1210 uint pw_min;
1211 uint pw_max;
1212 uint powertune_enable;
1213 uint scrypt_tmto;
1214 uint segment_size;
1215 char *truecrypt_keyfiles;
1216 uint workload_profile;
1217
1218 uint hash_mode;
1219 uint hash_type;
1220 uint kern_type;
1221 uint opts_type;
1222 uint salt_type;
1223 uint esalt_size;
1224 uint isSalted;
1225 uint dgst_size;
1226 uint opti_type;
1227 uint dgst_pos0;
1228 uint dgst_pos1;
1229 uint dgst_pos2;
1230 uint dgst_pos3;
1231
1232 #ifdef HAVE_HWMON
1233 uint gpu_temp_disable;
1234 uint gpu_temp_abort;
1235 uint gpu_temp_retain;
1236 #endif
1237
1238 char **rp_files;
1239 uint rp_files_cnt;
1240 uint rp_gen;
1241 uint rp_gen_seed;
1242
1243 FILE *pot_fp;
1244
1245 /**
1246 * used for restore
1247 */
1248
1249 u64 skip;
1250 u64 limit;
1251
1252 restore_data_t *rd;
1253
1254 u64 checkpoint_cur_words; // used for the "stop at next checkpoint" feature
1255
1256 /**
1257 * status, timer
1258 */
1259
1260 time_t runtime_start;
1261 time_t runtime_stop;
1262
1263 time_t proc_start;
1264 time_t proc_stop;
1265
1266 u64 words_cnt;
1267 u64 words_cur;
1268 u64 words_base;
1269
1270 u64 *words_progress_done; // progress number of words done per salt
1271 u64 *words_progress_rejected; // progress number of words rejected per salt
1272 u64 *words_progress_restored; // progress number of words restored per salt
1273
1274 hc_timer_t timer_running; // timer on current dict
1275 hc_timer_t timer_paused; // timer on current dict
1276
1277 float ms_paused; // timer on current dict
1278
1279 /**
1280 * hash_info and username
1281 */
1282
1283 hashinfo_t **hash_info;
1284 uint username;
1285
1286 int (*sort_by_digest) (const void *, const void *);
1287
1288 int (*parse_func) (char *, uint, hash_t *);
1289
1290 } hc_global_data_t;
1291
1292 extern hc_global_data_t data;
1293
1294 #endif