diff --git a/bindings/Makefile b/bindings/Makefile index 296b44f3..44423401 100644 --- a/bindings/Makefile +++ b/bindings/Makefile @@ -24,8 +24,8 @@ build: $(MAKE) -C go gen_const $(MAKE) -C java gen_const $(MAKE) -C ruby gen_const - python const_generator.py dotnet - python const_generator.py pascal + python3 const_generator.py dotnet + python3 const_generator.py pascal install: build $(MAKE) -C python install diff --git a/bindings/dotnet/UnicornManaged/Const/Common.fs b/bindings/dotnet/UnicornManaged/Const/Common.fs index 0b91cac1..03cc19a4 100644 --- a/bindings/dotnet/UnicornManaged/Const/Common.fs +++ b/bindings/dotnet/UnicornManaged/Const/Common.fs @@ -28,6 +28,7 @@ module Common = let UC_MODE_LITTLE_ENDIAN = 0 let UC_MODE_BIG_ENDIAN = 1073741824 + let UC_MODE_AFL = 536870912 let UC_MODE_ARM = 0 let UC_MODE_THUMB = 16 @@ -75,6 +76,10 @@ module Common = let UC_ERR_HOOK_EXIST = 19 let UC_ERR_RESOURCE = 20 let UC_ERR_EXCEPTION = 21 + let UC_ERR_AFL_RET_ERROR = 22 + let UC_ERR_AFL_RET_NO_AFL = 23 + let UC_ERR_AFL_RET_CALLED_TWICE = 24 + let UC_ERR_AFL_RET_FINISHED = 25 let UC_MEM_READ = 16 let UC_MEM_WRITE = 17 let UC_MEM_FETCH = 18 diff --git a/bindings/go/Makefile b/bindings/go/Makefile index fe898ae1..f8b0d5f1 100644 --- a/bindings/go/Makefile +++ b/bindings/go/Makefile @@ -6,7 +6,7 @@ all: gen_const cd unicorn && go build gen_const: - cd .. && python const_generator.py go + cd .. && python3 const_generator.py go test: all cd unicorn && LD_LIBRARY_PATH=../../../ DYLD_LIBRARY_PATH=../../../ go test diff --git a/bindings/go/unicorn/unicorn_const.go b/bindings/go/unicorn/unicorn_const.go index 6196fde5..a45e1452 100644 --- a/bindings/go/unicorn/unicorn_const.go +++ b/bindings/go/unicorn/unicorn_const.go @@ -23,6 +23,7 @@ const ( MODE_LITTLE_ENDIAN = 0 MODE_BIG_ENDIAN = 1073741824 + MODE_AFL = 536870912 MODE_ARM = 0 MODE_THUMB = 16 @@ -70,6 +71,10 @@ const ( ERR_HOOK_EXIST = 19 ERR_RESOURCE = 20 ERR_EXCEPTION = 21 + ERR_AFL_RET_ERROR = 22 + ERR_AFL_RET_NO_AFL = 23 + ERR_AFL_RET_CALLED_TWICE = 24 + ERR_AFL_RET_FINISHED = 25 MEM_READ = 16 MEM_WRITE = 17 MEM_FETCH = 18 diff --git a/bindings/java/Makefile b/bindings/java/Makefile index 73d20725..313db888 100644 --- a/bindings/java/Makefile +++ b/bindings/java/Makefile @@ -19,7 +19,7 @@ uninstall: $(MAKE) -f Makefile.build uninstall gen_const: - cd .. && python const_generator.py java + cd .. && python3 const_generator.py java clean: rm -f unicorn/*.class diff --git a/bindings/java/unicorn/UnicornConst.java b/bindings/java/unicorn/UnicornConst.java index f4396003..ce6744be 100644 --- a/bindings/java/unicorn/UnicornConst.java +++ b/bindings/java/unicorn/UnicornConst.java @@ -25,6 +25,7 @@ public interface UnicornConst { public static final int UC_MODE_LITTLE_ENDIAN = 0; public static final int UC_MODE_BIG_ENDIAN = 1073741824; + public static final int UC_MODE_AFL = 536870912; public static final int UC_MODE_ARM = 0; public static final int UC_MODE_THUMB = 16; @@ -72,6 +73,10 @@ public interface UnicornConst { public static final int UC_ERR_HOOK_EXIST = 19; public static final int UC_ERR_RESOURCE = 20; public static final int UC_ERR_EXCEPTION = 21; + public static final int UC_ERR_AFL_RET_ERROR = 22; + public static final int UC_ERR_AFL_RET_NO_AFL = 23; + public static final int UC_ERR_AFL_RET_CALLED_TWICE = 24; + public static final int UC_ERR_AFL_RET_FINISHED = 25; public static final int UC_MEM_READ = 16; public static final int UC_MEM_WRITE = 17; public static final int UC_MEM_FETCH = 18; diff --git a/bindings/pascal/unicorn/UnicornConst.pas b/bindings/pascal/unicorn/UnicornConst.pas index 29303b89..3f202cb9 100644 --- a/bindings/pascal/unicorn/UnicornConst.pas +++ b/bindings/pascal/unicorn/UnicornConst.pas @@ -26,6 +26,7 @@ const UC_API_MAJOR = 2; UC_MODE_LITTLE_ENDIAN = 0; UC_MODE_BIG_ENDIAN = 1073741824; + UC_MODE_AFL = 536870912; UC_MODE_ARM = 0; UC_MODE_THUMB = 16; @@ -73,6 +74,10 @@ const UC_API_MAJOR = 2; UC_ERR_HOOK_EXIST = 19; UC_ERR_RESOURCE = 20; UC_ERR_EXCEPTION = 21; + UC_ERR_AFL_RET_ERROR = 22; + UC_ERR_AFL_RET_NO_AFL = 23; + UC_ERR_AFL_RET_CALLED_TWICE = 24; + UC_ERR_AFL_RET_FINISHED = 25; UC_MEM_READ = 16; UC_MEM_WRITE = 17; UC_MEM_FETCH = 18; diff --git a/bindings/python/Makefile b/bindings/python/Makefile index ea831fd9..363d646f 100644 --- a/bindings/python/Makefile +++ b/bindings/python/Makefile @@ -3,16 +3,16 @@ .PHONY: gen_const install install3 clean sdist sdist3 bdist bdist3 sdist_win bdist_win gen_const: - cd .. && python const_generator.py python + cd .. && python3 const_generator.py python install: rm -rf src/ dist/ rm -rf prebuilt/win64/unicorn.dll rm -rf prebuilt/win32/unicorn.dll if test -n "${DESTDIR}"; then \ - python setup.py install --root="${DESTDIR}"; \ + python3 setup.py install --root="${DESTDIR}"; \ else \ - python setup.py install; \ + python3 setup.py install; \ fi install3: @@ -30,7 +30,7 @@ sdist: rm -rf src/ dist/ rm -rf prebuilt/win64/unicorn.dll rm -rf prebuilt/win32/unicorn.dll - python setup.py sdist register upload + python3 setup.py sdist register upload # build & upload PyPi package with source code of the core sdist3: @@ -44,7 +44,7 @@ bdist: rm -rf src/ dist/ rm -rf prebuilt/win64/unicorn.dll rm -rf prebuilt/win32/unicorn.dll - python setup.py bdist_wheel register upload + python3 setup.py bdist_wheel register upload # build & upload PyPi package with precompiled core bdist3: @@ -57,7 +57,7 @@ bdist3: # NOTE: be sure to have precompiled core under prebuilt/win*/ beforehand sdist_win: rm -rf src/ dist/ - python setup.py sdist register upload + python3 setup.py sdist register upload # build & upload PyPi package with prebuilt core # NOTE: be sure to have precompiled core under prebuilt/win*/ beforehand diff --git a/bindings/python/unicorn/unicorn_const.py b/bindings/python/unicorn/unicorn_const.py index a517572a..1b9ac693 100644 --- a/bindings/python/unicorn/unicorn_const.py +++ b/bindings/python/unicorn/unicorn_const.py @@ -21,6 +21,7 @@ UC_ARCH_MAX = 9 UC_MODE_LITTLE_ENDIAN = 0 UC_MODE_BIG_ENDIAN = 1073741824 +UC_MODE_AFL = 536870912 UC_MODE_ARM = 0 UC_MODE_THUMB = 16 @@ -68,6 +69,10 @@ UC_ERR_FETCH_UNALIGNED = 18 UC_ERR_HOOK_EXIST = 19 UC_ERR_RESOURCE = 20 UC_ERR_EXCEPTION = 21 +UC_ERR_AFL_RET_ERROR = 22 +UC_ERR_AFL_RET_NO_AFL = 23 +UC_ERR_AFL_RET_CALLED_TWICE = 24 +UC_ERR_AFL_RET_FINISHED = 25 UC_MEM_READ = 16 UC_MEM_WRITE = 17 UC_MEM_FETCH = 18 diff --git a/bindings/ruby/Makefile b/bindings/ruby/Makefile index 9d52de94..aa92fa53 100644 --- a/bindings/ruby/Makefile +++ b/bindings/ruby/Makefile @@ -8,4 +8,4 @@ install: gen_const cd unicorn_gem && gem install --local pkg/unicorn-engine-1.0.1.gem gen_const: - cd .. && python const_generator.py ruby + cd .. && python3 const_generator.py ruby diff --git a/bindings/ruby/unicorn_gem/lib/unicorn_engine/unicorn_const.rb b/bindings/ruby/unicorn_gem/lib/unicorn_engine/unicorn_const.rb index a09f3e82..698b71c0 100644 --- a/bindings/ruby/unicorn_gem/lib/unicorn_engine/unicorn_const.rb +++ b/bindings/ruby/unicorn_gem/lib/unicorn_engine/unicorn_const.rb @@ -23,6 +23,7 @@ module UnicornEngine UC_MODE_LITTLE_ENDIAN = 0 UC_MODE_BIG_ENDIAN = 1073741824 + UC_MODE_AFL = 536870912 UC_MODE_ARM = 0 UC_MODE_THUMB = 16 @@ -70,6 +71,10 @@ module UnicornEngine UC_ERR_HOOK_EXIST = 19 UC_ERR_RESOURCE = 20 UC_ERR_EXCEPTION = 21 + UC_ERR_AFL_RET_ERROR = 22 + UC_ERR_AFL_RET_NO_AFL = 23 + UC_ERR_AFL_RET_CALLED_TWICE = 24 + UC_ERR_AFL_RET_FINISHED = 25 UC_MEM_READ = 16 UC_MEM_WRITE = 17 UC_MEM_FETCH = 18