Wiktionary
turnabout is fair play
prov. It is allowable to retaliate against an enemy's dirty tricks by using the same ones against them.