The reason why you need to type sudo is to get permission for the action you'd like to take. If every piece of code could do anything it wanted all the time it would be very easy to hack you.
I looked around for a bit and you could configure your script as command that your specific user can run without a password. (stackoverflow)
However I'd suggest just starting it using sudo ./your-script-name so you can provide your password once up front so your whole script can run without asking for premission again for that specific command in your script.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The reason why you need to type
sudo
is to get permission for the action you'd like to take. If every piece of code could do anything it wanted all the time it would be very easy to hack you.I looked around for a bit and you could configure your script as command that your specific user can run without a password. (stackoverflow)
However I'd suggest just starting it using
sudo ./your-script-name
so you can provide your password once up front so your whole script can run without asking for premission again for that specific command in your script.