Parshat ראה discusses the issue of the נביא שקר, the false prophet, and how to deal with him. If he does something supernatural, you should not necessarily be impressed. There are powers that are given from the side of impurity. What one needs to look at is what this individual is saying. If he predicts something good will happen and it does not come to be, he is a false prophet. If he predicts something bad will happen and it does not come to be, he can still be a true prophet. The main indication of his validity was whether he preached teachings that were contrary to the Torah. The moment he deviates from the Torah, we know he cannot be a true prophet. The Alshich adds that we must remember that such an individual represents an infection among the Jewish people. In order for the infection to be contained and not spread, the only solution would be to put the false prophet to death.