Proverbs 11:27 (ESV)

27 Whoever diligently seeks good seeks favor, but evil comes to him who searches for it.

To diligently seek what is good is to be actively committed to doing what is right. Those who give themselves to doing what is good do so because they want to show favour to others. The favour they seek is to promote the good by doing good deeds. By seeking good they will reap favour. But whoever searches evil will reap what is wicked. Evil produces evil; therefore, to look for it will result in being corrupted by it.