yibn2008/find-process

Avoid prompting for password

Closed this issue · 2 comments

This tool is an obvious attack vector since it prompts for password if running on linux (and searching for a process by port number).

There should be a flag to switch off this behavior, so the tool just fails if a password is required.

I've looked into this a little further and this tool shouldn't run sudo. It is the responsibility of the user. I propose to remove it here:

https://github.com/yibn2008/find-process/blob/master/lib/find_pid.js#L70

try v1.4.0