(order: &Order, src_dir: &Path)
| 90 | } |
| 91 | |
| 92 | fn build_encrypted_output(order: &Order, src_dir: &Path) -> (EncryptionOutput, String) { |
| 93 | let filename = encrypted_filename(&order.encryption); |
| 94 | let path = src_dir.join(filename); |
| 95 | let include_path = format!("\"{}\"", filename); |
| 96 | |
| 97 | let output = match order.encryption { |
| 98 | Encryption::Xor => encrypt_xor(&order.shellcode_path, &path, non_zero_random_key()), |
| 99 | Encryption::Aes => { |
| 100 | encrypt_aes(&order.shellcode_path, &path, &random_aes_key(), &random_aes_iv()) |
| 101 | } |
| 102 | Encryption::Uuid => encrypt_uuid(&order.shellcode_path, &path), |
| 103 | }; |
| 104 | |
| 105 | (output, include_path) |
| 106 | } |
| 107 | |
| 108 | fn build_replacements(order: &Order, src_dir: &Path) -> HashMap<&'static str, String> { |
| 109 | let (enc_output, include_path) = build_encrypted_output(order, src_dir); |
no test coverage detected