get windows system call number dynamically, it doesn't need the system call table.
go get github.com/akkuman/getsyscallid/cmd/getsyscallid
> ./getsyscallid.exe -help
Usage of getsyscallid.exe:
-proc string
The name of the api name from ntdll.dll (default "NtCreateProcess")
> ./get.exe -proc NtCreateProcess
the syscall Number is: b9
package main
import (
"flag"
"fmt"
"github.com/akkuman/getsyscallid"
)
func main() {
flag.Parse()
sysID, err := getsyscallid.GetID("NtCreateProcess")
if err != nil {
fmt.Println(err)
return
}
fmt.Printf("the syscall Number is: %x\n", sysID)
}