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

Process.Name or Process.Pid can not be filtered #12

Open
championwang2020 opened this issue Jun 7, 2020 · 2 comments · May be fixed by #13
Open

Process.Name or Process.Pid can not be filtered #12

championwang2020 opened this issue Jun 7, 2020 · 2 comments · May be fixed by #13

Comments

@championwang2020
Copy link

The following code will throw panic:
"tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool {
return s.Process.Pid == 6720
})" or
"tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool {
return s.Process.Pname == "chrome"
})"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x511799]

@nodauf nodauf linked a pull request Feb 17, 2021 that will close this issue
@Rex0519
Copy link

Rex0519 commented Dec 16, 2021

The following code will throw panic:
"tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool {
return s.Process.Pid == 6720
})" or
"tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool {
return s.Process.Pname == "chrome"
})"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x511799]

Same issue. Always throws panic when runs TCPsocks but not UDPsocks.

@zkscpqm
Copy link

zkscpqm commented Jan 17, 2022

The following code will throw panic:
"tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool {
return s.Process.Pid == 6720
})" or
"tabs, err := netstat.TCPSocks(func(s *netstat.SockTabEntry) bool {
return s.Process.Pname == "chrome"
})"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x511799]

Same issue. Always throws panic when runs TCPsocks but not UDPsocks.

check #13

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

Successfully merging a pull request may close this issue.

3 participants