~をいいことに (taking advantage of)
grammar2 sentences
N/clause + をいいことに = 'taking advantage of (the fact that) ~,' often with a faintly negative tone — the speaker disapproves of the exploitation. From いい こと ('a good thing'): treating the situation as an opening to exploit.