
Some checks failed
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x32 name:Windows x86 os:windows-latest]) (push) Has been cancelled
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:Ubuntu x86_64 os:ubuntu-latest]) (push) Has been cancelled
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:Windows x86_64 os:windows-latest]) (push) Has been cancelled
Crate 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:macOS x86_64 os:macos-latest]) (push) Has been cancelled
PyPI 📦 Distribution / ${{ matrix.config.name }} (map[arch:x32 name:manylinux2014_i686 os:ubuntu-latest python-ver:3.8]) (push) Has been cancelled
PyPI 📦 Distribution / ${{ matrix.config.name }} (map[arch:x32 name:win32 os:windows-latest python-ver:3.8]) (push) Has been cancelled
PyPI 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:macos_x86_64 os:macos-latest python-ver:3.8]) (push) Has been cancelled
PyPI 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:manylinux2014_x86_64 os:ubuntu-latest python-ver:3.8]) (push) Has been cancelled
PyPI 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:sdist os:ubuntu-latest python-ver:3.8]) (push) Has been cancelled
PyPI 📦 Distribution / ${{ matrix.config.name }} (map[arch:x64 name:win_amd64 os:windows-latest python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} (gcc, map[arch:x64 archiver:7z a artifact:windows_mingw32.7z build_type:Debug generators:Ninja mingw:MINGW32 mingw-arch:i686 name:windows-x64 MINGW32 os:windows-latest python-arch:x64 python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} (gcc, map[arch:x64 archiver:7z a artifact:windows_mingw64.7z build_type:Debug generators:Ninja mingw:MINGW64 mingw-arch:x86_64 name:windows-x64 MINGW64 os:windows-latest python-arch:x64 python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} (gcc, map[arch:x64 archiver:7z a artifact:windows_msvc64.7z build_type:Debug generators:Visual Studio 16 2019 msvc-arch:x64 name:windows-x64 MSVC 64bit os:windows-latest python-arch:x64 python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} (gcc, map[arch:x86 archiver:7z a artifact:windows_msvc32.7z build_type:Debug generators:Visual Studio 16 2019 msvc-arch:x86 name:windows-x86 MSVC 32bit os:windows-latest python-arch:x86 python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} - ${{ matrix.compiler }} (gcc, map[arch:x64 archiver:7za a artifact:macos-cmake-x64.7z build_type:Debug generators:Ninja name:macos-x64 cmake os:macos-latest python-arch:x64 python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} - ${{ matrix.compiler }} (gcc, map[arch:x86_64 archiver:7za a artifact:Android-x86_64.7z build_type:Debug generators:Ninja name:android cmake os:macos-11 python-arch:x86_64 python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} - ${{ matrix.compiler }} (gcc, map[arch:aarch64 archiver:7z a artifact:ubuntu-cmake-aarch64.7z build_type:Debug distro:ubuntu20.04 generators:Ninja name:ubuntu-aarch64 cmake os:ubuntu-latest python-arch:aarch64 python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} - ${{ matrix.compiler }} (gcc, map[arch:ppc64le archiver:7z a artifact:ubuntu-cmake-ppc64le.7z build_type:Debug distro:ubuntu20.04 generators:Ninja name:ubuntu-ppc64le cmake os:ubuntu-latest python-arch:ppc python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} - ${{ matrix.compiler }} (gcc, map[arch:x64 archiver:7z a artifact:ubuntu-cmake-x64.7z build_type:Debug generators:Ninja name:ubuntu-x64 cmake os:ubuntu-latest python-arch:x64 python-ver:3.8]) (push) Has been cancelled
Build UC2 / ${{ matrix.config.name }} - ${{ matrix.compiler }} (gcc, map[arch:x86 archiver:7z a artifact:ubuntu-cmake-x86.7z build_type:Debug generators:Ninja name:ubuntu-x86 cmake os:ubuntu-latest python-arch:x86 python-ver:3.8]) (push) Has been cancelled
PyPI 📦 Distribution / publish (push) Has been cancelled
To download/update the Unicorn Go bindings, run:
go get -u github.com/unicorn-engine/unicorn/bindings/go
A very basic usage example follows
(Does not handle most errors for brevity. Please see sample.go for a more hygenic example):
package main
import (
"fmt"
uc "github.com/unicorn-engine/unicorn/bindings/go/unicorn"
)
func main() {
mu, _ := uc.NewUnicorn(uc.ARCH_X86, uc.MODE_32)
// mov eax, 1234
code := []byte{184, 210, 4, 0, 0}
mu.MemMap(0x1000, 0x1000)
mu.MemWrite(0x1000, code)
if err := mu.Start(0x1000, 0x1000+uint64(len(code))); err != nil {
panic(err)
}
eax, _ := mu.RegRead(uc.X86_REG_EAX)
fmt.Printf("EAX is now: %d\n", eax)
}
An example program exercising far more Unicorn functionality and error handling can be found in sample.go.