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 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 P[18];
302
303 uint S0[256];
304 uint S1[256];
305 uint S2[256];
306 uint S3[256];
307
308 } bcrypt_tmp_t;
309
310 typedef struct
311 {
312 uint digest[2];
313
314 uint P[18];
315
316 uint S0[256];
317 uint S1[256];
318 uint S2[256];
319 uint S3[256];
320
321 } pwsafe2_tmp_t;
322
323 typedef struct
324 {
325 uint digest_buf[8];
326
327 } pwsafe3_tmp_t;
328
329 typedef struct
330 {
331 uint digest_buf[5];
332
333 } androidpin_tmp_t;
334
335 typedef struct
336 {
337 uint ipad[5];
338 uint opad[5];
339
340 uint dgst[10];
341 uint out[10];
342
343 } androidfde_tmp_t;
344
345 typedef struct
346 {
347 uint ipad[16];
348 uint opad[16];
349
350 uint dgst[64];
351 uint out[64];
352
353 } tc_tmp_t;
354
355 typedef struct
356 {
357 uint64_t ipad[8];
358 uint64_t opad[8];
359
360 uint64_t dgst[32];
361 uint64_t out[32];
362
363 } tc64_tmp_t;
364
365 typedef struct
366 {
367 uint ipad[5];
368 uint opad[5];
369
370 uint dgst[5];
371 uint out[5];
372
373 } agilekey_tmp_t;
374
375 typedef struct
376 {
377 uint ipad[5];
378 uint opad[5];
379
380 uint dgst1[5];
381 uint out1[5];
382
383 uint dgst2[5];
384 uint out2[5];
385
386 } mywallet_tmp_t;
387
388 typedef struct
389 {
390 uint ipad[5];
391 uint opad[5];
392
393 uint dgst[5];
394 uint out[5];
395
396 } sha1aix_tmp_t;
397
398 typedef struct
399 {
400 uint ipad[8];
401 uint opad[8];
402
403 uint dgst[8];
404 uint out[8];
405
406 } sha256aix_tmp_t;
407
408 typedef struct
409 {
410 uint64_t ipad[8];
411 uint64_t opad[8];
412
413 uint64_t dgst[8];
414 uint64_t out[8];
415
416 } sha512aix_tmp_t;
417
418 typedef struct
419 {
420 uint ipad[8];
421 uint opad[8];
422
423 uint dgst[8];
424 uint out[8];
425
426 } lastpass_tmp_t;
427
428 typedef struct
429 {
430 uint64_t digest_buf[8];
431
432 } drupal7_tmp_t;
433
434 typedef struct
435 {
436 uint ipad[5];
437 uint opad[5];
438
439 uint dgst[5];
440 uint out[5];
441
442 } lotus8_tmp_t;
443
444 typedef struct
445 {
446 uint out[5];
447
448 } office2007_tmp_t;
449
450 typedef struct
451 {
452 uint out[5];
453
454 } office2010_tmp_t;
455
456 typedef struct
457 {
458 uint64_t out[8];
459
460 } office2013_tmp_t;
461
462 typedef struct
463 {
464 uint digest_buf[5];
465
466 } saph_sha1_tmp_t;
467
468 typedef struct
469 {
470 uint32_t ipad[4];
471 uint32_t opad[4];
472
473 uint32_t dgst[32];
474 uint32_t out[32];
475
476 } pbkdf2_md5_tmp_t;
477
478 typedef struct
479 {
480 uint32_t ipad[5];
481 uint32_t opad[5];
482
483 uint32_t dgst[32];
484 uint32_t out[32];
485
486 } pbkdf2_sha1_tmp_t;
487
488 typedef struct
489 {
490 uint32_t ipad[8];
491 uint32_t opad[8];
492
493 uint32_t dgst[32];
494 uint32_t out[32];
495
496 } pbkdf2_sha256_tmp_t;
497
498 typedef struct
499 {
500 uint64_t ipad[8];
501 uint64_t opad[8];
502
503 uint64_t dgst[16];
504 uint64_t out[16];
505
506 } pbkdf2_sha512_tmp_t;
507
508 typedef struct
509 {
510 uint64_t out[8];
511
512 } ecryptfs_tmp_t;
513
514 typedef struct
515 {
516 uint64_t ipad[8];
517 uint64_t opad[8];
518
519 uint64_t dgst[16];
520 uint64_t out[16];
521
522 } oraclet_tmp_t;
523
524 typedef struct
525 {
526 uint block[16];
527
528 uint dgst[8];
529
530 uint block_len;
531 uint final_len;
532
533 } seven_zip_tmp_t;
534
535 typedef struct
536 {
537 uint Kc[16];
538 uint Kd[16];
539
540 uint iv[2];
541
542 } bsdicrypt_tmp_t;
543
544 typedef struct
545 {
546 uint dgst[17][5];
547
548 } rar3_tmp_t;
549
550 typedef struct
551 {
552 uint user[16];
553
554 } cram_md5_t;
555
556 typedef struct
557 {
558 uint iv_buf[4];
559 uint iv_len;
560
561 uint salt_buf[4];
562 uint salt_len;
563
564 uint crc;
565
566 uint data_buf[96];
567 uint data_len;
568
569 uint unpack_size;
570
571 } seven_zip_t;
572
573 typedef struct
574 {
575 char *user_name;
576 uint user_len;
577
578 } user_t;
579
580 typedef struct
581 {
582 user_t *user;
583 char *orighash;
584
585 } hashinfo_t;
586
587 typedef struct
588 {
589 void *digest;
590 salt_t *salt;
591 void *esalt;
592 int cracked;
593 hashinfo_t *hash_info;
594
595 } hash_t;
596
597 typedef struct
598 {
599 uint key;
600 uint64_t val;
601
602 } hcstat_table_t;
603
604 typedef struct
605 {
606 uint cs_buf[0x100];
607 uint cs_len;
608
609 } cs_t;
610
611 typedef struct
612 {
613 char essid[36];
614
615 unsigned char mac1[6];
616 unsigned char mac2[6];
617 unsigned char nonce1[32];
618 unsigned char nonce2[32];
619
620 unsigned char eapol[256];
621 int eapol_size;
622
623 int keyver;
624 unsigned char keymic[16];
625
626 } hccap_t;
627
628 typedef struct
629 {
630 char signature[4];
631 uint32_t salt_buf[8];
632 uint32_t iterations;
633 uint32_t hash_buf[8];
634
635 } psafe3_t;
636
637 typedef struct
638 {
639 char plain_buf[256];
640 int plain_len;
641
642 hash_t hash;
643
644 } pot_t;
645
646 typedef struct
647 {
648 uint64_t cnt;
649
650 #ifdef _POSIX
651 struct stat stat;
652 #endif
653
654 #ifdef _WIN
655 struct __stat64 stat;
656 #endif
657
658 } dictstat_t;
659
660 typedef struct
661 {
662 uint len;
663
664 char buf[0x100];
665
666 } cpu_rule_t;
667
668 typedef struct
669 {
670 uint cmds[15];
671
672 } gpu_rule_t;
673
674 typedef struct
675 {
676 union
677 {
678 uint8_t hc4[4][ 64];
679 uint32_t hi4[4][ 16];
680 uint64_t hl4[4][ 8];
681
682 uint8_t hc2[2][128];
683 uint32_t hi2[2][ 32];
684 uint64_t hl2[2][ 16];
685
686 uint8_t hc1[1][256];
687 uint32_t hi1[1][ 64];
688 uint64_t hl1[1][ 32];
689 };
690
691 uint pw_len;
692 uint alignment_placeholder_1;
693 uint alignment_placeholder_2;
694 uint alignment_placeholder_3;
695
696 } pw_t;
697
698 typedef struct
699 {
700 uint i;
701
702 } bf_t;
703
704 typedef struct
705 {
706 uint b[32];
707
708 } bs_word_t;
709
710 typedef struct
711 {
712 uint i[8];
713
714 uint pw_len;
715
716 } comb_t;
717
718 typedef struct
719 {
720 pw_t pw_buf;
721
722 uint cnt;
723
724 } pw_cache_t;
725
726 typedef struct
727 {
728 uint32_t version_bin;
729 char cwd[256];
730 uint32_t pid;
731
732 uint32_t dictpos;
733 uint32_t maskpos;
734
735 uint64_t words_cur;
736
737 uint32_t argc;
738 char **argv;
739
740 } restore_data_t;
741
742 typedef struct
743 {
744 char *file_name;
745 long seek;
746 time_t ctime;
747
748 } outfile_data_t;
749
750 typedef struct
751 {
752 char *buf;
753 uint32_t incr;
754 uint32_t avail;
755 uint32_t cnt;
756 uint32_t pos;
757
758 } wl_data_t;
759
760 typedef struct
761 {
762 uint bitmap_shift;
763 uint collisions;
764
765 } bitmap_result_t;
766
767 #define CPT_BUF 0x20000
768
769 typedef struct
770 {
771 uint cracked;
772 time_t timestamp;
773
774 } cpt_t;
775
776 /*
777 typedef struct
778 {
779 uint plain_buf[16];
780 uint plain_len;
781
782 } plain_t;
783 */
784
785 typedef struct
786 {
787 uint gidvid;
788 uint il_pos;
789
790 } plain_t;
791
792 typedef struct
793 {
794 uint word_buf[16];
795
796 } wordl_t;
797
798 typedef struct
799 {
800 uint word_buf[1];
801
802 } wordr_t;
803
804 #define RULES_MAX 16
805 #define PW_MIN 0
806 #define PW_MAX 54
807 #define PW_MAX1 (PW_MAX + 1)
808 #define PW_DICTMAX 31
809 #define PW_DICTMAX1 (PW_DICTMAX + 1)
810
811 struct __hc_device_param
812 {
813 uint device_id;
814
815 uint gpu_processors;
816 uint gpu_threads;
817 uint gpu_accel;
818 uint gpu_vector_width;
819 uint64_t gpu_maxmem_alloc;
820 uint gpu_power; // these both are based on their _user counterpart
821 uint gpu_blocks; // but are modified by autotuner and used inside crack loops
822 uint gpu_power_user;
823 uint gpu_blocks_user;
824
825 uint size_pws;
826 uint size_tmps;
827 uint size_hooks;
828 uint size_root_css;
829 uint size_markov_css;
830 uint size_digests;
831 uint size_salts;
832 uint size_shown;
833 uint size_results;
834 uint size_plains;
835
836 uint vect_size;
837
838 uint (*pw_add) (struct __hc_device_param *, const uint8_t *, const uint);
839
840 void (*pw_transpose) (const pw_t *, pw_t *);
841
842 FILE *combs_fp;
843 comb_t *combs_buf;
844
845 void *hooks_buf;
846
847 pw_cache_t *pw_caches;
848
849 pw_t *pws_buf;
850 uint pws_cnt;
851 uint64_t pw_cnt;
852
853 uint64_t words_off;
854 uint64_t words_done;
855
856 uint *result;
857
858 uint outerloop_pos;
859 uint outerloop_left;
860
861 uint innerloop_pos;
862 uint innerloop_left;
863
864 uint speed_pos;
865 uint64_t speed_cnt[SPEED_CACHE];
866 float speed_ms[SPEED_CACHE];
867 hc_timer_t speed_rec[SPEED_CACHE];
868
869 hc_timer_t timer_speed;
870
871 // device specific attributes starting
872
873 #ifdef _CUDA
874
875 int sm_major;
876 int sm_minor;
877
878 CUdevice device;
879
880 CUfunction function1;
881 CUfunction function12;
882 CUfunction function2;
883 CUfunction function23;
884 CUfunction function3;
885 CUfunction function_mp;
886 CUfunction function_mp_l;
887 CUfunction function_mp_r;
888 CUfunction function_amp;
889 CUfunction function_tb;
890 CUfunction function_tm;
891
892 CUcontext context;
893 CUmodule module;
894 CUmodule module_mp;
895 CUmodule module_amp;
896 CUstream stream;
897
898 CUdeviceptr d_pws_buf;
899 CUdeviceptr d_pws_amp_buf;
900 CUdeviceptr d_words_buf_l;
901 CUdeviceptr d_words_buf_r;
902 CUdeviceptr c_words_buf_r;
903 CUdeviceptr d_rules;
904 CUdeviceptr c_rules;
905 CUdeviceptr d_combs;
906 CUdeviceptr c_combs;
907 CUdeviceptr d_bfs;
908 CUdeviceptr c_bfs;
909 CUdeviceptr d_tm;
910 CUdeviceptr c_tm;
911 size_t c_bytes;
912 CUdeviceptr d_bitmap_s1_a;
913 CUdeviceptr d_bitmap_s1_b;
914 CUdeviceptr d_bitmap_s1_c;
915 CUdeviceptr d_bitmap_s1_d;
916 CUdeviceptr d_bitmap_s2_a;
917 CUdeviceptr d_bitmap_s2_b;
918 CUdeviceptr d_bitmap_s2_c;
919 CUdeviceptr d_bitmap_s2_d;
920 CUdeviceptr d_plain_bufs;
921 CUdeviceptr d_digests_buf;
922 CUdeviceptr d_digests_shown;
923 CUdeviceptr d_salt_bufs;
924 CUdeviceptr d_esalt_bufs;
925 CUdeviceptr d_bcrypt_bufs;
926 CUdeviceptr d_tmps;
927 CUdeviceptr d_hooks;
928 CUdeviceptr d_result;
929 CUdeviceptr d_scryptV_buf;
930 CUdeviceptr d_root_css_buf;
931 CUdeviceptr d_markov_css_buf;
932
933 #elif _OCL
934
935 char *device_name;
936 char *device_version;
937 char *driver_version;
938
939 cl_device_id device;
940
941 cl_kernel kernel1;
942 cl_kernel kernel12;
943 cl_kernel kernel2;
944 cl_kernel kernel23;
945 cl_kernel kernel3;
946 cl_kernel kernel_mp;
947 cl_kernel kernel_mp_l;
948 cl_kernel kernel_mp_r;
949 cl_kernel kernel_amp;
950 cl_kernel kernel_tb;
951 cl_kernel kernel_tm;
952
953 cl_context context;
954
955 cl_program program;
956 cl_program program_mp;
957 cl_program program_amp;
958
959 cl_command_queue command_queue;
960
961 cl_mem d_pws_buf;
962 cl_mem d_pws_amp_buf;
963 cl_mem d_words_buf_l;
964 cl_mem d_words_buf_r;
965 cl_mem d_rules;
966 cl_mem d_rules_c;
967 cl_mem d_combs;
968 cl_mem d_combs_c;
969 cl_mem d_bfs;
970 cl_mem d_bfs_c;
971 cl_mem d_tm_c;
972 cl_mem d_bitmap_s1_a;
973 cl_mem d_bitmap_s1_b;
974 cl_mem d_bitmap_s1_c;
975 cl_mem d_bitmap_s1_d;
976 cl_mem d_bitmap_s2_a;
977 cl_mem d_bitmap_s2_b;
978 cl_mem d_bitmap_s2_c;
979 cl_mem d_bitmap_s2_d;
980 cl_mem d_plain_bufs;
981 cl_mem d_digests_buf;
982 cl_mem d_digests_shown;
983 cl_mem d_salt_bufs;
984 cl_mem d_esalt_bufs;
985 cl_mem d_bcrypt_bufs;
986 cl_mem d_tmps;
987 cl_mem d_hooks;
988 cl_mem d_result;
989 cl_mem d_scryptV_buf;
990 cl_mem d_root_css_buf;
991 cl_mem d_markov_css_buf;
992
993 #endif
994
995 #define PARAMCNT 32
996
997 void *kernel_params[PARAMCNT];
998 void *kernel_params_mp[PARAMCNT];
999 void *kernel_params_mp_r[PARAMCNT];
1000 void *kernel_params_mp_l[PARAMCNT];
1001 void *kernel_params_amp[PARAMCNT];
1002 void *kernel_params_tb[PARAMCNT];
1003 void *kernel_params_tm[PARAMCNT];
1004
1005 uint32_t kernel_params_buf32[PARAMCNT];
1006
1007 uint32_t kernel_params_mp_buf32[PARAMCNT];
1008 uint64_t kernel_params_mp_buf64[PARAMCNT];
1009
1010 uint32_t kernel_params_mp_r_buf32[PARAMCNT];
1011 uint64_t kernel_params_mp_r_buf64[PARAMCNT];
1012
1013 uint32_t kernel_params_mp_l_buf32[PARAMCNT];
1014 uint64_t kernel_params_mp_l_buf64[PARAMCNT];
1015
1016 uint32_t kernel_params_amp_buf32[PARAMCNT];
1017
1018 };
1019
1020 typedef struct __hc_device_param hc_device_param_t;
1021
1022 typedef struct
1023 {
1024 HM_ADAPTER adapter_index;
1025
1026 #ifdef _OCL
1027 int od_version;
1028 #endif
1029
1030 int fan_supported;
1031
1032 // int busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1033 // int devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1034
1035 } hm_attrs_t;
1036
1037 typedef struct
1038 {
1039 /**
1040 * threads
1041 */
1042
1043 uint devices_status;
1044 uint devices_cnt;
1045 hc_device_param_t *devices_param;
1046
1047 uint gpu_blocks_all;
1048
1049 /**
1050 * attack specific
1051 */
1052
1053 uint wordlist_mode;
1054 uint hashlist_mode;
1055 uint hashlist_format;
1056
1057 uint attack_mode;
1058 uint attack_kern;
1059 uint attack_exec;
1060
1061 uint gpu_rules_cnt;
1062 gpu_rule_t *gpu_rules_buf;
1063
1064 uint combs_mode;
1065 uint combs_cnt;
1066
1067 uint bfs_cnt;
1068
1069 uint css_cnt;
1070 cs_t *css_buf;
1071
1072 cs_t *root_css_buf;
1073 cs_t *markov_css_buf;
1074
1075 char *rule_buf_l;
1076 char *rule_buf_r;
1077 int rule_len_l;
1078 int rule_len_r;
1079
1080 /**
1081 * hardware watchdog
1082 */
1083
1084 HM_LIB hm_dll;
1085 hm_attrs_t hm_device[DEVICES_MAX];
1086
1087 /**
1088 * hashes
1089 */
1090
1091 uint digests_cnt;
1092 uint digests_done;
1093 uint digests_saved;
1094
1095 void *digests_buf;
1096 uint *digests_shown;
1097 uint *digests_shown_tmp;
1098
1099 uint salts_cnt;
1100 uint salts_done;
1101
1102 salt_t *salts_buf;
1103 uint *salts_shown;
1104
1105 void *esalts_buf;
1106
1107 /**
1108 * logging
1109 */
1110
1111 uint logfile_disable;
1112 char *logfile;
1113 char *topid;
1114 char *subid;
1115
1116 /**
1117 * crack-per-time
1118 */
1119
1120 cpt_t cpt_buf[CPT_BUF];
1121 int cpt_pos;
1122 time_t cpt_start;
1123 uint64_t cpt_total;
1124
1125 /**
1126 * user
1127 */
1128
1129 char *dictfile;
1130 char *dictfile2;
1131 char *mask;
1132 uint maskcnt;
1133 uint maskpos;
1134 char *session;
1135 char separator;
1136 char *hashfile;
1137 char *install_dir;
1138 char *outfile;
1139 uint outfile_format;
1140 uint outfile_autohex;
1141 uint outfile_check_timer;
1142 char *eff_restore_file;
1143 char *new_restore_file;
1144 char *induction_directory;
1145 char *outfile_check_directory;
1146 uint loopback;
1147 char *loopback_file;
1148 uint restore;
1149 uint restore_timer;
1150 uint restore_disable;
1151 uint status;
1152 uint status_timer;
1153 uint status_automat;
1154 uint quiet;
1155 uint force;
1156 uint benchmark;
1157 uint runtime;
1158 uint remove;
1159 uint remove_timer;
1160 uint debug_mode;
1161 char *debug_file;
1162 uint hex_charset;
1163 uint hex_salt;
1164 uint hex_wordlist;
1165 uint pw_min;
1166 uint pw_max;
1167 float gpu_blocks_div;
1168 uint gpu_accel;
1169 uint gpu_loops;
1170 uint powertune_enable;
1171 uint scrypt_tmto;
1172 uint segment_size;
1173 char *truecrypt_keyfiles;
1174
1175 uint hash_mode;
1176 uint hash_type;
1177 uint kern_type;
1178 uint opts_type;
1179 uint salt_type;
1180 uint esalt_size;
1181 uint isSalted;
1182 uint dgst_size;
1183 uint opti_type;
1184 uint dgst_pos0;
1185 uint dgst_pos1;
1186 uint dgst_pos2;
1187 uint dgst_pos3;
1188
1189 uint gpu_temp_disable;
1190 uint gpu_temp_abort;
1191 uint gpu_temp_retain;
1192
1193 char **rp_files;
1194 uint rp_files_cnt;
1195 uint rp_gen;
1196 uint rp_gen_seed;
1197
1198 FILE *pot_fp;
1199
1200 /**
1201 * used for restore
1202 */
1203
1204 uint64_t skip;
1205 uint64_t limit;
1206
1207 restore_data_t *rd;
1208
1209 /**
1210 * status, timer
1211 */
1212
1213 time_t runtime_start;
1214 time_t runtime_stop;
1215
1216 time_t proc_start;
1217 time_t proc_stop;
1218
1219 uint64_t words_cnt;
1220 uint64_t words_cur;
1221 uint64_t words_base;
1222
1223 uint64_t *words_progress_done; // progress number of words done per salt
1224 uint64_t *words_progress_rejected; // progress number of words rejected per salt
1225 uint64_t *words_progress_restored; // progress number of words restored per salt
1226
1227 hc_timer_t timer_running; // timer on current dict
1228 hc_timer_t timer_paused; // timer on current dict
1229
1230 float ms_paused; // timer on current dict
1231
1232 /**
1233 * hash_info and username
1234 */
1235
1236 hashinfo_t **hash_info;
1237 uint username;
1238
1239 int (*sort_by_digest) (const void *, const void *);
1240
1241 int (*parse_func) (char *, uint, hash_t *);
1242
1243 } hc_global_data_t;
1244
1245 extern hc_global_data_t data;
1246
1247 #endif