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

Function read_shellcode

src/shellcode_reader.rs:3–12  ·  view source on GitHub ↗
(file_path: &Path)

Source from the content-addressed store, hash-verified

1use std::path::Path;
2
3pub fn read_shellcode(file_path: &Path) -> Vec<u8> {
4 println!("[+] Reading binary file..");
5 match std::fs::read(file_path) {
6 Ok(bytes) => {
7 println!("[+] Done reading binary file!");
8 bytes
9 }
10 Err(err) => panic!("Failed to read shellcode file {:?}: {}", file_path, err),
11 }
12}
13
14#[cfg(test)]
15mod tests {

Callers 5

encrypt_xorFunction · 0.85
encrypt_aesFunction · 0.85
encrypt_uuidFunction · 0.85

Calls

no outgoing calls

Tested by 2