1 /**
2  * Author......: See docs/credits.txt
3  * License.....: MIT
4  */
5 
6 #include "common.h"
7 #include "types.h"
8 #include "modules.h"
9 #include "bitops.h"
10 #include "convert.h"
11 #include "shared.h"
12 
13 static const u32   ATTACK_EXEC    = ATTACK_EXEC_INSIDE_KERNEL;
14 static const u32   DGST_POS0      = 0;
15 static const u32   DGST_POS1      = 1;
16 static const u32   DGST_POS2      = 2;
17 static const u32   DGST_POS3      = 3;
18 static const u32   DGST_SIZE      = DGST_SIZE_4_4;
19 static const u32   HASH_CATEGORY  = HASH_CATEGORY_DOCUMENTS;
20 static const char *HASH_NAME      = "PDF 1.1 - 1.3 (Acrobat 2 - 4)";
21 static const u64   KERN_TYPE      = 10400;
22 static const u32   OPTI_TYPE      = OPTI_TYPE_ZERO_BYTE
23                                   | OPTI_TYPE_NOT_ITERATED;
24 static const u64   OPTS_TYPE      = OPTS_TYPE_PT_GENERATE_LE;
25 static const u32   SALT_TYPE      = SALT_TYPE_EMBEDDED;
26 static const char *ST_PASS        = "hashcat";
27 static const char *ST_HASH        = "$pdf$1*2*40*-1*0*16*01221086741440841668371056103222*32*27c3fecef6d46a78eb61b8b4dbc690f5f8a2912bbb9afc842c12d79481568b74*32*0000000000000000000000000000000000000000000000000000000000000000";
28 
module_attack_exec(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)29 u32         module_attack_exec    (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC;     }
module_dgst_pos0(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)30 u32         module_dgst_pos0      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0;       }
module_dgst_pos1(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)31 u32         module_dgst_pos1      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS1;       }
module_dgst_pos2(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)32 u32         module_dgst_pos2      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS2;       }
module_dgst_pos3(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)33 u32         module_dgst_pos3      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS3;       }
module_dgst_size(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)34 u32         module_dgst_size      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_SIZE;       }
module_hash_category(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)35 u32         module_hash_category  (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_CATEGORY;   }
module_hash_name(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)36 const char *module_hash_name      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return HASH_NAME;       }
module_kern_type(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)37 u64         module_kern_type      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return KERN_TYPE;       }
module_opti_type(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)38 u32         module_opti_type      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTI_TYPE;       }
module_opts_type(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)39 u64         module_opts_type      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return OPTS_TYPE;       }
module_salt_type(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)40 u32         module_salt_type      (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return SALT_TYPE;       }
module_st_hash(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)41 const char *module_st_hash        (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH;         }
module_st_pass(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)42 const char *module_st_pass        (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS;         }
43 
44 typedef struct pdf
45 {
46   int  V;
47   int  R;
48   int  P;
49 
50   int  enc_md;
51 
52   u32  id_buf[8];
53   u32  u_buf[32];
54   u32  o_buf[32];
55 
56   int  id_len;
57   int  o_len;
58   int  u_len;
59 
60   u32  rc4key[2];
61   u32  rc4data[2];
62 
63 } pdf_t;
64 
65 static const char *SIGNATURE_PDF = "$pdf$";
66 
module_jit_build_options(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra,MAYBE_UNUSED const hashes_t * hashes,MAYBE_UNUSED const hc_device_param_t * device_param)67 char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
68 {
69   char *jit_build_options = NULL;
70 
71   u32 native_threads = 0;
72 
73   if (device_param->opencl_device_type & CL_DEVICE_TYPE_CPU)
74   {
75     native_threads = 1;
76   }
77   else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
78   {
79     if (device_param->device_local_mem_size < 49152)
80     {
81       native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
82     }
83     else
84     {
85       native_threads = device_param->kernel_preferred_wgs_multiple;
86     }
87   }
88 
89   hc_asprintf (&jit_build_options, "-D FIXED_LOCAL_SIZE=%u -D _unroll", native_threads);
90 
91   return jit_build_options;
92 }
93 
module_esalt_size(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)94 u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
95 {
96   const u64 esalt_size = (const u64) sizeof (pdf_t);
97 
98   return esalt_size;
99 }
100 
module_pw_max(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const user_options_t * user_options,MAYBE_UNUSED const user_options_extra_t * user_options_extra)101 u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
102 {
103   const u32 pw_max = 32; // https://www.pdflib.com/knowledge-base/pdf-password-security/encryption/
104 
105   return pw_max;
106 }
107 
module_hash_decode(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED void * digest_buf,MAYBE_UNUSED salt_t * salt,MAYBE_UNUSED void * esalt_buf,MAYBE_UNUSED void * hook_salt_buf,MAYBE_UNUSED hashinfo_t * hash_info,const char * line_buf,MAYBE_UNUSED const int line_len)108 int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len)
109 {
110   u32 *digest = (u32 *) digest_buf;
111 
112   pdf_t *pdf = (pdf_t *) esalt_buf;
113 
114   token_t token;
115 
116   token.token_cnt  = 12;
117 
118   token.signatures_cnt    = 1;
119   token.signatures_buf[0] = SIGNATURE_PDF;
120 
121   token.len[0]     = 5;
122   token.attr[0]    = TOKEN_ATTR_FIXED_LENGTH
123                    | TOKEN_ATTR_VERIFY_SIGNATURE;
124 
125   token.len_min[1] = 1;
126   token.len_max[1] = 1;
127   token.sep[1]     = '*';
128   token.attr[1]    = TOKEN_ATTR_VERIFY_LENGTH
129                    | TOKEN_ATTR_VERIFY_DIGIT;
130 
131   token.len_min[2] = 1;
132   token.len_max[2] = 1;
133   token.sep[2]     = '*';
134   token.attr[2]    = TOKEN_ATTR_VERIFY_LENGTH
135                    | TOKEN_ATTR_VERIFY_DIGIT;
136 
137   token.len_min[3] = 2;
138   token.len_max[3] = 2;
139   token.sep[3]     = '*';
140   token.attr[3]    = TOKEN_ATTR_VERIFY_LENGTH
141                    | TOKEN_ATTR_VERIFY_DIGIT;
142 
143   token.len_min[4] = 1;
144   token.len_max[4] = 6;
145   token.sep[4]     = '*';
146   token.attr[4]    = TOKEN_ATTR_VERIFY_LENGTH;
147 
148   token.len_min[5] = 1;
149   token.len_max[5] = 1;
150   token.sep[5]     = '*';
151   token.attr[5]    = TOKEN_ATTR_VERIFY_LENGTH
152                    | TOKEN_ATTR_VERIFY_DIGIT;
153 
154   token.len_min[6] = 2;
155   token.len_max[6] = 2;
156   token.sep[6]     = '*';
157   token.attr[6]    = TOKEN_ATTR_VERIFY_LENGTH
158                    | TOKEN_ATTR_VERIFY_DIGIT;
159 
160   token.len_min[7] = 32;
161   token.len_max[7] = 32;
162   token.sep[7]     = '*';
163   token.attr[7]    = TOKEN_ATTR_VERIFY_LENGTH
164                    | TOKEN_ATTR_VERIFY_HEX;
165 
166   token.len_min[8] = 2;
167   token.len_max[8] = 2;
168   token.sep[8]     = '*';
169   token.attr[8]    = TOKEN_ATTR_VERIFY_LENGTH
170                    | TOKEN_ATTR_VERIFY_DIGIT;
171 
172   token.len_min[9] = 64;
173   token.len_max[9] = 64;
174   token.sep[9]     = '*';
175   token.attr[9]    = TOKEN_ATTR_VERIFY_LENGTH
176                    | TOKEN_ATTR_VERIFY_HEX;
177 
178   token.len_min[10] = 2;
179   token.len_max[10] = 2;
180   token.sep[10]     = '*';
181   token.attr[10]    = TOKEN_ATTR_VERIFY_LENGTH
182                    | TOKEN_ATTR_VERIFY_DIGIT;
183 
184   token.len_min[11] = 64;
185   token.len_max[11] = 64;
186   token.sep[11]     = '*';
187   token.attr[11]    = TOKEN_ATTR_VERIFY_LENGTH
188                     | TOKEN_ATTR_VERIFY_HEX;
189 
190   const int rc_tokenizer = input_tokenizer ((const u8 *) line_buf, line_len, &token);
191 
192   if (rc_tokenizer != PARSER_OK) return (rc_tokenizer);
193 
194   const u8 *V_pos      = token.buf[1];
195   const u8 *R_pos      = token.buf[2];
196   const u8 *bits_pos   = token.buf[3];
197   const u8 *P_pos      = token.buf[4];
198   const u8 *enc_md_pos = token.buf[5];
199   const u8 *id_len_pos = token.buf[6];
200   const u8 *id_buf_pos = token.buf[7];
201   const u8 *u_len_pos  = token.buf[8];
202   const u8 *u_buf_pos  = token.buf[9];
203   const u8 *o_len_pos  = token.buf[10];
204   const u8 *o_buf_pos  = token.buf[11];
205 
206   // validate data
207 
208   const int V = strtol ((const char *) V_pos, NULL, 10);
209   const int R = strtol ((const char *) R_pos, NULL, 10);
210   const int P = strtol ((const char *) P_pos, NULL, 10);
211 
212   if (V != 1) return (PARSER_SALT_VALUE);
213   if (R != 2) return (PARSER_SALT_VALUE);
214 
215   const int enc_md = strtol ((const char *) enc_md_pos, NULL, 10);
216 
217   if ((enc_md != 0) && (enc_md != 1)) return (PARSER_SALT_VALUE);
218 
219   const int id_len = strtol ((const char *) id_len_pos, NULL, 10);
220   const int u_len  = strtol ((const char *) u_len_pos,  NULL, 10);
221   const int o_len  = strtol ((const char *) o_len_pos,  NULL, 10);
222 
223   if (id_len != 16) return (PARSER_SALT_VALUE);
224   if (u_len  != 32) return (PARSER_SALT_VALUE);
225   if (o_len  != 32) return (PARSER_SALT_VALUE);
226 
227   const int bits = strtol ((const char *) bits_pos, NULL, 10);
228 
229   if (bits != 40) return (PARSER_SALT_VALUE);
230 
231   // copy data to esalt
232 
233   pdf->V = V;
234   pdf->R = R;
235   pdf->P = P;
236 
237   pdf->enc_md = enc_md;
238 
239   pdf->id_buf[0] = hex_to_u32 (id_buf_pos +  0);
240   pdf->id_buf[1] = hex_to_u32 (id_buf_pos +  8);
241   pdf->id_buf[2] = hex_to_u32 (id_buf_pos + 16);
242   pdf->id_buf[3] = hex_to_u32 (id_buf_pos + 24);
243   pdf->id_len    = id_len;
244 
245   pdf->u_buf[0]  = hex_to_u32 (u_buf_pos +  0);
246   pdf->u_buf[1]  = hex_to_u32 (u_buf_pos +  8);
247   pdf->u_buf[2]  = hex_to_u32 (u_buf_pos + 16);
248   pdf->u_buf[3]  = hex_to_u32 (u_buf_pos + 24);
249   pdf->u_buf[4]  = hex_to_u32 (u_buf_pos + 32);
250   pdf->u_buf[5]  = hex_to_u32 (u_buf_pos + 40);
251   pdf->u_buf[6]  = hex_to_u32 (u_buf_pos + 48);
252   pdf->u_buf[7]  = hex_to_u32 (u_buf_pos + 56);
253   pdf->u_len     = u_len;
254 
255   pdf->o_buf[0]  = hex_to_u32 (o_buf_pos +  0);
256   pdf->o_buf[1]  = hex_to_u32 (o_buf_pos +  8);
257   pdf->o_buf[2]  = hex_to_u32 (o_buf_pos + 16);
258   pdf->o_buf[3]  = hex_to_u32 (o_buf_pos + 24);
259   pdf->o_buf[4]  = hex_to_u32 (o_buf_pos + 32);
260   pdf->o_buf[5]  = hex_to_u32 (o_buf_pos + 40);
261   pdf->o_buf[6]  = hex_to_u32 (o_buf_pos + 48);
262   pdf->o_buf[7]  = hex_to_u32 (o_buf_pos + 56);
263   pdf->o_len     = o_len;
264 
265   // we use ID for salt, maybe needs to change, we will see...
266 
267   salt->salt_buf[0] = pdf->id_buf[0];
268   salt->salt_buf[1] = pdf->id_buf[1];
269   salt->salt_buf[2] = pdf->id_buf[2];
270   salt->salt_buf[3] = pdf->id_buf[3];
271   salt->salt_len    = pdf->id_len;
272 
273   digest[0] = pdf->u_buf[0];
274   digest[1] = pdf->u_buf[1];
275   digest[2] = pdf->u_buf[2];
276   digest[3] = pdf->u_buf[3];
277 
278   return (PARSER_OK);
279 }
280 
module_hash_encode(MAYBE_UNUSED const hashconfig_t * hashconfig,MAYBE_UNUSED const void * digest_buf,MAYBE_UNUSED const salt_t * salt,MAYBE_UNUSED const void * esalt_buf,MAYBE_UNUSED const void * hook_salt_buf,MAYBE_UNUSED const hashinfo_t * hash_info,char * line_buf,MAYBE_UNUSED const int line_size)281 int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, MAYBE_UNUSED const void *hook_salt_buf, MAYBE_UNUSED const hashinfo_t *hash_info, char *line_buf, MAYBE_UNUSED const int line_size)
282 {
283   const pdf_t *pdf = (const pdf_t *) esalt_buf;
284 
285   const int line_len = snprintf (line_buf, line_size, "$pdf$%d*%d*%d*%d*%d*%d*%08x%08x%08x%08x*%d*%08x%08x%08x%08x%08x%08x%08x%08x*%d*%08x%08x%08x%08x%08x%08x%08x%08x",
286     pdf->V,
287     pdf->R,
288     40,
289     pdf->P,
290     pdf->enc_md,
291     pdf->id_len,
292     byte_swap_32 (pdf->id_buf[0]),
293     byte_swap_32 (pdf->id_buf[1]),
294     byte_swap_32 (pdf->id_buf[2]),
295     byte_swap_32 (pdf->id_buf[3]),
296     pdf->u_len,
297     byte_swap_32 (pdf->u_buf[0]),
298     byte_swap_32 (pdf->u_buf[1]),
299     byte_swap_32 (pdf->u_buf[2]),
300     byte_swap_32 (pdf->u_buf[3]),
301     byte_swap_32 (pdf->u_buf[4]),
302     byte_swap_32 (pdf->u_buf[5]),
303     byte_swap_32 (pdf->u_buf[6]),
304     byte_swap_32 (pdf->u_buf[7]),
305     pdf->o_len,
306     byte_swap_32 (pdf->o_buf[0]),
307     byte_swap_32 (pdf->o_buf[1]),
308     byte_swap_32 (pdf->o_buf[2]),
309     byte_swap_32 (pdf->o_buf[3]),
310     byte_swap_32 (pdf->o_buf[4]),
311     byte_swap_32 (pdf->o_buf[5]),
312     byte_swap_32 (pdf->o_buf[6]),
313     byte_swap_32 (pdf->o_buf[7])
314   );
315 
316   return line_len;
317 }
318 
module_init(module_ctx_t * module_ctx)319 void module_init (module_ctx_t *module_ctx)
320 {
321   module_ctx->module_context_size             = MODULE_CONTEXT_SIZE_CURRENT;
322   module_ctx->module_interface_version        = MODULE_INTERFACE_VERSION_CURRENT;
323 
324   module_ctx->module_attack_exec              = module_attack_exec;
325   module_ctx->module_benchmark_esalt          = MODULE_DEFAULT;
326   module_ctx->module_benchmark_hook_salt      = MODULE_DEFAULT;
327   module_ctx->module_benchmark_mask           = MODULE_DEFAULT;
328   module_ctx->module_benchmark_salt           = MODULE_DEFAULT;
329   module_ctx->module_build_plain_postprocess  = MODULE_DEFAULT;
330   module_ctx->module_deep_comp_kernel         = MODULE_DEFAULT;
331   module_ctx->module_deprecated_notice        = MODULE_DEFAULT;
332   module_ctx->module_dgst_pos0                = module_dgst_pos0;
333   module_ctx->module_dgst_pos1                = module_dgst_pos1;
334   module_ctx->module_dgst_pos2                = module_dgst_pos2;
335   module_ctx->module_dgst_pos3                = module_dgst_pos3;
336   module_ctx->module_dgst_size                = module_dgst_size;
337   module_ctx->module_dictstat_disable         = MODULE_DEFAULT;
338   module_ctx->module_esalt_size               = module_esalt_size;
339   module_ctx->module_extra_buffer_size        = MODULE_DEFAULT;
340   module_ctx->module_extra_tmp_size           = MODULE_DEFAULT;
341   module_ctx->module_extra_tuningdb_block     = MODULE_DEFAULT;
342   module_ctx->module_forced_outfile_format    = MODULE_DEFAULT;
343   module_ctx->module_hash_binary_count        = MODULE_DEFAULT;
344   module_ctx->module_hash_binary_parse        = MODULE_DEFAULT;
345   module_ctx->module_hash_binary_save         = MODULE_DEFAULT;
346   module_ctx->module_hash_decode_potfile      = MODULE_DEFAULT;
347   module_ctx->module_hash_decode_zero_hash    = MODULE_DEFAULT;
348   module_ctx->module_hash_decode              = module_hash_decode;
349   module_ctx->module_hash_encode_status       = MODULE_DEFAULT;
350   module_ctx->module_hash_encode_potfile      = MODULE_DEFAULT;
351   module_ctx->module_hash_encode              = module_hash_encode;
352   module_ctx->module_hash_init_selftest       = MODULE_DEFAULT;
353   module_ctx->module_hash_mode                = MODULE_DEFAULT;
354   module_ctx->module_hash_category            = module_hash_category;
355   module_ctx->module_hash_name                = module_hash_name;
356   module_ctx->module_hashes_count_min         = MODULE_DEFAULT;
357   module_ctx->module_hashes_count_max         = MODULE_DEFAULT;
358   module_ctx->module_hlfmt_disable            = MODULE_DEFAULT;
359   module_ctx->module_hook_extra_param_size    = MODULE_DEFAULT;
360   module_ctx->module_hook_extra_param_init    = MODULE_DEFAULT;
361   module_ctx->module_hook_extra_param_term    = MODULE_DEFAULT;
362   module_ctx->module_hook12                   = MODULE_DEFAULT;
363   module_ctx->module_hook23                   = MODULE_DEFAULT;
364   module_ctx->module_hook_salt_size           = MODULE_DEFAULT;
365   module_ctx->module_hook_size                = MODULE_DEFAULT;
366   module_ctx->module_jit_build_options        = module_jit_build_options;
367   module_ctx->module_jit_cache_disable        = MODULE_DEFAULT;
368   module_ctx->module_kernel_accel_max         = MODULE_DEFAULT;
369   module_ctx->module_kernel_accel_min         = MODULE_DEFAULT;
370   module_ctx->module_kernel_loops_max         = MODULE_DEFAULT;
371   module_ctx->module_kernel_loops_min         = MODULE_DEFAULT;
372   module_ctx->module_kernel_threads_max       = MODULE_DEFAULT;
373   module_ctx->module_kernel_threads_min       = MODULE_DEFAULT;
374   module_ctx->module_kern_type                = module_kern_type;
375   module_ctx->module_kern_type_dynamic        = MODULE_DEFAULT;
376   module_ctx->module_opti_type                = module_opti_type;
377   module_ctx->module_opts_type                = module_opts_type;
378   module_ctx->module_outfile_check_disable    = MODULE_DEFAULT;
379   module_ctx->module_outfile_check_nocomp     = MODULE_DEFAULT;
380   module_ctx->module_potfile_custom_check     = MODULE_DEFAULT;
381   module_ctx->module_potfile_disable          = MODULE_DEFAULT;
382   module_ctx->module_potfile_keep_all_hashes  = MODULE_DEFAULT;
383   module_ctx->module_pwdump_column            = MODULE_DEFAULT;
384   module_ctx->module_pw_max                   = module_pw_max;
385   module_ctx->module_pw_min                   = MODULE_DEFAULT;
386   module_ctx->module_salt_max                 = MODULE_DEFAULT;
387   module_ctx->module_salt_min                 = MODULE_DEFAULT;
388   module_ctx->module_salt_type                = module_salt_type;
389   module_ctx->module_separator                = MODULE_DEFAULT;
390   module_ctx->module_st_hash                  = module_st_hash;
391   module_ctx->module_st_pass                  = module_st_pass;
392   module_ctx->module_tmp_size                 = MODULE_DEFAULT;
393   module_ctx->module_unstable_warning         = MODULE_DEFAULT;
394   module_ctx->module_warmup_disable           = MODULE_DEFAULT;
395 }
396