Update java bindings for new version of uc_mem_map

This commit is contained in:
Chris Eagle
2015-08-28 20:54:05 -07:00
parent 85ad7725da
commit 1d6bd17a13
12 changed files with 55 additions and 42 deletions

2
bindings/java/samples/Shellcode.java Normal file → Executable file
View File

@ -121,7 +121,7 @@ public class Shellcode {
Unicorn u = new Unicorn(Unicorn.UC_ARCH_X86, Unicorn.UC_MODE_32);
// map 2MB memory for this emulation
u.mem_map(ADDRESS, 2 * 1024 * 1024);
u.mem_map(ADDRESS, 2 * 1024 * 1024, Unicorn.UC_PROT_READ | Unicorn.UC_PROT_WRITE);
// write machine code to be emulated to memory
u.mem_write(ADDRESS, X86_CODE32_SELF);