Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error compile 32 bits #9

Open
BlackShell256 opened this issue Mar 7, 2023 · 0 comments
Open

error compile 32 bits #9

BlackShell256 opened this issue Mar 7, 2023 · 0 comments

Comments

@BlackShell256
Copy link

go version
go version go1.20.1 windows/amd64

GOARCH: 386
GOOS: windows

Code:

Dll, err := os.ReadFile("C:\Windows\SysWOW64\ntdll.dll")
if err != nil {
	panic(err)
}

Nt, err := universal.NewLoader()
if err != nil {
	panic(err)
}

NtLibrary, err := Nt.LoadLibrary("main", &Dll)
if err != nil {
	panic(err)
}
fmt.Println(NtLibrary.BaseAddress)

Error:

github.com/Binject/universal ..\..\..\go\pkg\mod\github.com\!binject\universal@v0.0.0-20220519011857-bea739e758c0\loader_windows.universal\un.go:119:13: array length ^uigo:82:13: array length ^uint32(0) (constant 4294967295 of type uint32) must be integer bas> ..\..\..\go\pkg\mod\github.com\!binject\universal@v0.0.0-20220519011857-bea739e758c0\loader_windows.go:99:13: array length ^uint32(0) (constant 4294967295 of type uint32) must be integer

https://github.com/Binject/universal/blob/main/loader_windows.go

Line 82:
hbuf := (*[^[^uint32(0)]byte)(unsafe.Pointer(uintptr(loc))))

Line 99:
buf := ([[^uint32(0)]byte)(unsafe.Pointer(uintptr(dst)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant