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