388. Whoever commits extortion, by putting any person in fear of an accusation against that person or any other, of having committed, or attempted to commit, any offence punishable with death, or with imprisonment for a term which may extend to twenty years, or with imprisonment for a term which may extend to ten years, or of having attempted to induce any other person to commit such offence, shall be punished with imprisonment for a term which may extend to ten years, and shall also be liable to fine or to whipping; and if the offence is one punishable under sections 377, 377B and 377C, may be punished with imprisonment for a term which may extend to twenty years.