Revamp process attribution of network connections
This commit is contained in:
@@ -60,7 +60,17 @@ func apiAuthenticator(s *http.Server, r *http.Request) (grantAccess bool, err er
|
||||
var procsChecked []string
|
||||
|
||||
// get process
|
||||
proc, err := process.GetProcessByEndpoints(r.Context(), remoteIP, remotePort, localIP, localPort, packet.TCP) // switch reverse/local to get remote process
|
||||
proc, _, err := process.GetProcessByEndpoints(
|
||||
r.Context(),
|
||||
packet.IPv4,
|
||||
packet.TCP,
|
||||
// switch reverse/local to get remote process
|
||||
remoteIP,
|
||||
remotePort,
|
||||
localIP,
|
||||
localPort,
|
||||
false,
|
||||
)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("failed to get process: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user