Whoever accepts or obtains, or agrees to accept, or attempts to obtain from any person, for himself or for any other person, gratification whatever, as a motive or reward for inducing, by corrupt or illegal means any public servant to do or to forbear to do any official act, or in the exercise of the official functions of such public servant to ...