If the snake is passing by them, there should be no movement from their side because if any movement is made, they will feel threatened and might attack. Snakes tend to keep their eyes on their target. If it makes eye contact with anyone, make sure to look the snake in the eye and slowly retreat yourself and make distance from the snake. Don’t attack it unnecessarily. Snakes are already endangered. Attack only to defend yourself. Other than that, you should read manuals and guide books to defend yourself from any animal.