cleanup and working on a bug

This commit is contained in:
Teach2Breach
2025-01-19 10:31:57 -06:00
parent 9727dfc2aa
commit 370f117508
3 changed files with 6 additions and 16 deletions
+3
View File
@@ -0,0 +1,3 @@
/target
Cargo.lock
*.bin
+2 -15
View File
@@ -1,9 +1,8 @@
use std::fs::File;
use std::io::Write;
pub mod shellcode;
use dll2shell::gen_shellcode;
fn main() {
//collect command line args
let args: Vec<String> = std::env::args().collect();
@@ -13,17 +12,5 @@ fn main() {
return;
}
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");
}
gen_shellcode(args);
}
+1 -1
View File
@@ -527,4 +527,4 @@ pub fn shellcode_rdi_to_file(dll_path: &str, function_name: &str) {
shellcode_file
.write_all(&shellcode)
.expect("Could not write contents to shellcode file");
}
}