Skip to content

Commit

Permalink
fix: asm format
Browse files Browse the repository at this point in the history
  • Loading branch information
trimscash committed Dec 25, 2023
1 parent d0e5473 commit 694a669
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,12 @@ fn disassembled_shellcode(binary: &Vec<u8>, bit: u32) {
let mut formatter = NasmFormatter::new();
let mut output = String::new();
while decoder.can_decode() {
// There's also a decode() method that returns an instruction but that also
// means it copies an instruction (40 bytes):
// instruction = decoder.decode();
decoder.decode_out(&mut instruction);

// Format the instruction ("disassemble" it)
output.clear();
formatter.format(&instruction, &mut output);

println!(" {}", output);
println!("{}", output);
}
}

Expand Down

0 comments on commit 694a669

Please sign in to comment.