Add files via upload

This commit is contained in:
Kirk Trychel
2024-04-21 16:31:40 -05:00
committed by GitHub
parent 82adb0b357
commit 962cf4c6fe
2 changed files with 18 additions and 0 deletions
+4
View File
@@ -3,6 +3,10 @@ name = "dll2shell"
version = "0.1.0"
edition = "2021"
[lib]
name = "dll2shell"
path = "src/lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
+14
View File
@@ -0,0 +1,14 @@
use std::fs::File;
use std::io::Write;
mod shellcode;
pub fn gen_shellcode (args: Vec<String>) { // create shellcode and output to file
//println!("args: {:?}", args);
let link_shellcode = shellcode::shellcode_rdi(&args[1], &args[2], "".to_string());
let mut output_file = File::create("shellcode.bin").expect("could not write file");
output_file
.write_all(&link_shellcode)
.expect("could not write contents to output file");
println!("output: shellcode.bin");
}