In India, under Prevention of Corruption Law, to give bribe or to attempt to give bribe to any public servant is also a crime.
If any public servant is being pestered by some person trying to bribe him, it is possible for him to inform anti corruption police by complaint.
Then, anti corruption police is required by law to lay a trap and to catch the bribe giver.
The law is there. It is for people to use provisions of law if they really want to fight corruption.