go-netstat
go-netstat copied to clipboard
feature windows 32bit support
Is there any reason that only windows 64 bit is supported?
https://github.com/cakturk/go-netstat/blob/master/netstat/netstat_windows.go#L1
No, but I haven't tested the code on a 32-bit Windows machine. I'm not sure the memory layouts and alignment requirements are the same. If you tested it on a 32-bit Windows machine and you are sure it works, we can remove the build constraint.
No, but I haven't tested the code on a 32-bit Windows machine. I'm not sure the memory layouts and alignment requirements are the same. If you tested it on a 32-bit Windows machine and you are sure it works, we can remove the build constraint.
I have test 32-bit binary (build on ubuntu 18.04) on windows 10 64-bit and it works fine, I think it should work if remove the build constrain
$ GOOS=windows GOARCH=386 go build -o go-netstat.exe main.go
$ file go-netstat.exe
go-netstat.exe: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
and it works
❯ .\go-netstat.exe -lis
Not all processes could be identified, you would have to be root to see it all.
Proto Local Addr Foreign Addr State PID/Program name
tcp 0.0.0.0:135 0.0.0.0:0 LISTEN 1420/svchost.exe