First working version of -m 13500
[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
919 uint vector_width;
920
921 uint kernel_threads;
922 uint kernel_loops;
923 uint kernel_accel;
924 uint kernel_loops_min;
925 uint kernel_loops_max;
926 uint kernel_accel_min;
927 uint kernel_accel_max;
928 uint kernel_power;
929 uint kernel_power_user;
930
931 uint size_pws;
932 uint size_tmps;
933 uint size_hooks;
934 uint size_bfs;
935 uint size_combs;
936 uint size_rules;
937 uint size_rules_c;
938 uint size_root_css;
939 uint size_markov_css;
940 uint size_digests;
941 uint size_salts;
942 uint size_shown;
943 uint size_results;
944 uint size_plains;
945
946 FILE *combs_fp;
947 comb_t *combs_buf;
948
949 void *hooks_buf;
950
951 pw_t *pws_buf;
952 uint pws_cnt;
953
954 u64 words_off;
955 u64 words_done;
956
957 uint *result;
958
959 uint outerloop_pos;
960 uint outerloop_left;
961
962 uint innerloop_pos;
963 uint innerloop_left;
964
965 uint exec_pos;
966 double exec_ms[EXEC_CACHE];
967
968 // this is "current" speed
969
970 uint speed_pos;
971 u64 speed_cnt[SPEED_CACHE];
972 double speed_ms[SPEED_CACHE];
973
974 hc_timer_t timer_speed;
975
976 // device specific attributes starting
977
978 char *device_name;
979 char *device_name_chksum;
980 char *device_version;
981 char *driver_version;
982
983 bool opencl_v12;
984
985 cl_uint vendor_id;
986
987 cl_kernel kernel1;
988 cl_kernel kernel12;
989 cl_kernel kernel2;
990 cl_kernel kernel23;
991 cl_kernel kernel3;
992 cl_kernel kernel_mp;
993 cl_kernel kernel_mp_l;
994 cl_kernel kernel_mp_r;
995 cl_kernel kernel_amp;
996 cl_kernel kernel_tm;
997 cl_kernel kernel_weak;
998
999 cl_context context;
1000
1001 cl_program program;
1002 cl_program program_mp;
1003 cl_program program_amp;
1004 cl_program program_weak;
1005
1006 cl_command_queue command_queue;
1007
1008 cl_mem d_pws_buf;
1009 cl_mem d_pws_amp_buf;
1010 cl_mem d_words_buf_l;
1011 cl_mem d_words_buf_r;
1012 cl_mem d_rules;
1013 cl_mem d_rules_c;
1014 cl_mem d_combs;
1015 cl_mem d_combs_c;
1016 cl_mem d_bfs;
1017 cl_mem d_bfs_c;
1018 cl_mem d_tm_c;
1019 cl_mem d_bitmap_s1_a;
1020 cl_mem d_bitmap_s1_b;
1021 cl_mem d_bitmap_s1_c;
1022 cl_mem d_bitmap_s1_d;
1023 cl_mem d_bitmap_s2_a;
1024 cl_mem d_bitmap_s2_b;
1025 cl_mem d_bitmap_s2_c;
1026 cl_mem d_bitmap_s2_d;
1027 cl_mem d_plain_bufs;
1028 cl_mem d_digests_buf;
1029 cl_mem d_digests_shown;
1030 cl_mem d_salt_bufs;
1031 cl_mem d_esalt_bufs;
1032 cl_mem d_bcrypt_bufs;
1033 cl_mem d_tmps;
1034 cl_mem d_hooks;
1035 cl_mem d_result;
1036 cl_mem d_scryptV_buf;
1037 cl_mem d_root_css_buf;
1038 cl_mem d_markov_css_buf;
1039
1040 void *kernel_params[PARAMCNT];
1041 void *kernel_params_mp[PARAMCNT];
1042 void *kernel_params_mp_r[PARAMCNT];
1043 void *kernel_params_mp_l[PARAMCNT];
1044 void *kernel_params_amp[PARAMCNT];
1045 void *kernel_params_tm[PARAMCNT];
1046
1047 u32 kernel_params_buf32[PARAMCNT];
1048
1049 u32 kernel_params_mp_buf32[PARAMCNT];
1050 u64 kernel_params_mp_buf64[PARAMCNT];
1051
1052 u32 kernel_params_mp_r_buf32[PARAMCNT];
1053 u64 kernel_params_mp_r_buf64[PARAMCNT];
1054
1055 u32 kernel_params_mp_l_buf32[PARAMCNT];
1056 u64 kernel_params_mp_l_buf64[PARAMCNT];
1057
1058 u32 kernel_params_amp_buf32[PARAMCNT];
1059 };
1060
1061 typedef struct __hc_device_param hc_device_param_t;
1062
1063 #ifdef HAVE_HWMON
1064 typedef struct
1065 {
1066 union
1067 {
1068 #ifdef HAVE_ADL
1069 HM_ADAPTER_AMD amd;
1070 #endif
1071
1072 #if defined(HAVE_NVML) || defined(HAVE_NVAPI)
1073 HM_ADAPTER_NV nv;
1074 #endif
1075
1076 } adapter_index;
1077
1078 int od_version;
1079 int fan_supported;
1080
1081 // int busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1082 // int devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1083
1084 } hm_attrs_t;
1085 #endif // HAVE_HWMON
1086
1087 typedef struct
1088 {
1089 /**
1090 * threads
1091 */
1092
1093 uint devices_status;
1094 uint devices_cnt;
1095 uint devices_active;
1096
1097 hc_device_param_t *devices_param;
1098
1099 /**
1100 * workload specific
1101 */
1102
1103 uint kernel_power_all;
1104 float kernel_power_div;
1105
1106 /**
1107 * attack specific
1108 */
1109
1110 uint wordlist_mode;
1111 uint hashlist_mode;
1112 uint hashlist_format;
1113
1114 uint attack_mode;
1115 uint attack_kern;
1116 uint attack_exec;
1117
1118 uint kernel_rules_cnt;
1119
1120 kernel_rule_t *kernel_rules_buf;
1121
1122 uint combs_mode;
1123 uint combs_cnt;
1124
1125 uint bfs_cnt;
1126
1127 uint css_cnt;
1128 cs_t *css_buf;
1129
1130 cs_t *root_css_buf;
1131 cs_t *markov_css_buf;
1132
1133 char *rule_buf_l;
1134 char *rule_buf_r;
1135 int rule_len_l;
1136 int rule_len_r;
1137
1138 /**
1139 * opencl library stuff
1140 */
1141
1142 void *ocl;
1143
1144 /**
1145 * hardware watchdog
1146 */
1147
1148 #ifdef HAVE_HWMON
1149 void *hm_nv;
1150 void *hm_amd;
1151 hm_attrs_t hm_device[DEVICES_MAX];
1152 #endif
1153
1154 /**
1155 * hashes
1156 */
1157
1158 uint digests_cnt;
1159 uint digests_done;
1160 uint digests_saved;
1161
1162 void *digests_buf;
1163 uint *digests_shown;
1164 uint *digests_shown_tmp;
1165
1166 uint salts_cnt;
1167 uint salts_done;
1168
1169 salt_t *salts_buf;
1170 uint *salts_shown;
1171
1172 void *esalts_buf;
1173
1174 /**
1175 * logging
1176 */
1177
1178 uint logfile_disable;
1179 char *logfile;
1180 char *topid;
1181 char *subid;
1182
1183 /**
1184 * crack-per-time
1185 */
1186
1187 cpt_t cpt_buf[CPT_BUF];
1188 int cpt_pos;
1189 time_t cpt_start;
1190 u64 cpt_total;
1191
1192 /**
1193 * user
1194 */
1195
1196 char *dictfile;
1197 char *dictfile2;
1198 char *mask;
1199 uint maskcnt;
1200 uint maskpos;
1201 char *session;
1202 char separator;
1203 char *hashfile;
1204 char *homedir;
1205 char *install_dir;
1206 char *profile_dir;
1207 char *session_dir;
1208 char *shared_dir;
1209 char *outfile;
1210 uint outfile_format;
1211 uint outfile_autohex;
1212 uint outfile_check_timer;
1213 char *eff_restore_file;
1214 char *new_restore_file;
1215 char *induction_directory;
1216 char *outfile_check_directory;
1217 uint loopback;
1218 char *loopback_file;
1219 uint restore;
1220 uint restore_timer;
1221 uint restore_disable;
1222 uint status;
1223 uint status_timer;
1224 uint status_automat;
1225 uint quiet;
1226 uint force;
1227 uint benchmark;
1228 uint benchmark_repeats;
1229 uint runtime;
1230 uint remove;
1231 uint remove_timer;
1232 uint debug_mode;
1233 char *debug_file;
1234 uint hex_charset;
1235 uint hex_salt;
1236 uint hex_wordlist;
1237 uint pw_min;
1238 uint pw_max;
1239 uint powertune_enable;
1240 uint scrypt_tmto;
1241 uint segment_size;
1242 char *truecrypt_keyfiles;
1243 uint workload_profile;
1244
1245 uint hash_mode;
1246 uint hash_type;
1247 uint kern_type;
1248 uint opts_type;
1249 uint salt_type;
1250 uint esalt_size;
1251 uint isSalted;
1252 uint dgst_size;
1253 uint opti_type;
1254 uint dgst_pos0;
1255 uint dgst_pos1;
1256 uint dgst_pos2;
1257 uint dgst_pos3;
1258
1259 #ifdef HAVE_HWMON
1260 uint gpu_temp_disable;
1261 uint gpu_temp_abort;
1262 uint gpu_temp_retain;
1263 #endif
1264
1265 char **rp_files;
1266 uint rp_files_cnt;
1267 uint rp_gen;
1268 uint rp_gen_seed;
1269
1270 FILE *pot_fp;
1271
1272 /**
1273 * used for restore
1274 */
1275
1276 u64 skip;
1277 u64 limit;
1278
1279 restore_data_t *rd;
1280
1281 u64 checkpoint_cur_words; // used for the "stop at next checkpoint" feature
1282
1283 /**
1284 * status, timer
1285 */
1286
1287 time_t runtime_start;
1288 time_t runtime_stop;
1289
1290 time_t proc_start;
1291 time_t proc_stop;
1292
1293 u64 words_cnt;
1294 u64 words_cur;
1295 u64 words_base;
1296
1297 u64 *words_progress_done; // progress number of words done per salt
1298 u64 *words_progress_rejected; // progress number of words rejected per salt
1299 u64 *words_progress_restored; // progress number of words restored per salt
1300
1301 hc_timer_t timer_running; // timer on current dict
1302 hc_timer_t timer_paused; // timer on current dict
1303
1304 double ms_paused; // timer on current dict
1305
1306 /**
1307 * hash_info and username
1308 */
1309
1310 hashinfo_t **hash_info;
1311 uint username;
1312
1313 int (*sort_by_digest) (const void *, const void *);
1314
1315 int (*parse_func) (char *, uint, hash_t *);
1316
1317 } hc_global_data_t;
1318
1319 extern hc_global_data_t data;
1320
1321 #endif