Can a defender put his hands in front of the eyes of a shooter?

no. no way

acctually it is perfectly leagal to do that. as long as your hands dont make contact with the player shooting, you can do it all game long. in fact it is a good stategy to use if you are contesting a shot from a taller player.

The first answer is correct. The second answer is incorrect. It is a technical foul to face guard a player at all levels through college. However, it is allowed to an extent in the NBA (eye guarding is allowed).