mirror of
https://github.com/Teach2Breach/dll2shell
synced 2026-06-08 12:39:17 +00:00
cleanup and working on a bug
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
/target
|
||||
Cargo.lock
|
||||
*.bin
|
||||
+2
-15
@@ -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
@@ -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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user