Whoever being or expecting to be a public servant, accepts or obtains, or agrees to accept, or attempts to obtain from any person, for himself or for any other person, any gratification whatever, other than legal remuneration, as a motive or reward for doing a forbearing to do any official act or for showing or forbearing to show, in the exercis...