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