MCPcopy Create free account
hub / github.com/Nariod/RustPacker / build_encrypted_output

Function build_encrypted_output

src/puzzle.rs:92–106  ·  view source on GitHub ↗
(order: &Order, src_dir: &Path)

Source from the content-addressed store, hash-verified

90}
91
92fn 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
108fn build_replacements(order: &Order, src_dir: &Path) -> HashMap<&'static str, String> {
109 let (enc_output, include_path) = build_encrypted_output(order, src_dir);

Callers 1

build_replacementsFunction · 0.85

Calls 7

encrypted_filenameFunction · 0.85
encrypt_xorFunction · 0.85
non_zero_random_keyFunction · 0.85
encrypt_aesFunction · 0.85
random_aes_keyFunction · 0.85
random_aes_ivFunction · 0.85
encrypt_uuidFunction · 0.85

Tested by

no test coverage detected