whatever is true, whatever is noble, whatever is right, whatever is pure, whatever is lovely, whatever is admirable if anything is excellent or praiseworthy think about such things.
Our minds are like a bucket. Fill them up and nothing else can get in. Fill our minds with pure thoughts and the devil can't put any evil thoughts in.