I have heard that moth balls repel snakes. I don't know if it is true or not. I found this on the internet.
Snakes tend to follow their prey which usually like to stick to the edges of walls, fences, the base of trees, etc. These are the places where snakes are most likely to pick up on fresh scents of mice, rats and other rodents.
Some studies have shown that it is possible to use some substances that have a pungent and long lasting nature which effect the snakes smelling mechanism in such a way that it will prefer to leave the vicinity of the substance.
Naphtalene is one such substance. Naphtalene is the substance used in moth balls (and you know how pungent that is). Moth balls are really just any one of certain kinds of wax balls that have been infused with naphtalene. Naphtalene can also be bought in liquid form from specialized dealers. In my experience you can spray it onto to porous stone, concrete, wood, dry leaves, trees, etc. All these places are good places upon which to spray naphtalene just as long as they are not washed with water afterwards.
In small areas moth balls may be good because the substance is trapped inside a wax ball and therefore it's release will be slow and over a prolonged period of time. In larger areas you will need to buy naphtalene in liquid form and to spray it directly onto surfaces. Application should be repeated every two months during the snake season for best results. Naphtalene will not harm the envronment or cause any lasting damage to the snake. It will simply cause it go to look for food elsewhere.