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