People always mistaken , that snake have weak sense of hearing because they have no ears, In fact they have great hearing sense. They have that inner ear parts. Also their whole body serves as their in able to &sense and hear the sound vibrations to their ear. From the muscles in their whole &body, the sounds flow in their jaw that connected to their inner ear part.
In their sense of sight, its also weak, there's some that can see through the darkness but in near sight. So in able to have idea if there's someone near to them , they use their pits, the heat sensors of the snake. It is located to the front of their face, even if slight heat, their pits can detect it.
So don't underestimate the sneak for their sense because their use them whole body to detect any vibrations, sounds an use their pits they can easily detect any body heat near to them.