The Holy Spirit can still give that today, as in the gift of discernment, the ability to know whether something being claimed as real as is a legit supernatural happening or not.I’ll try to put it better- God gave them the knowledge, infallibly, that they needed for the occasion, whether it was healing as with Peter and John and the lame man, or with Paul as with the slave girl with the spirit. Of course they weren’t infallible men who always knew everything infallibly! That wasn’t true of any OT or NT prophet.
Back to the OP, and it’s the last time I’ll mention this book, but exorcism is dealt with very thoroughly and biblically in the Leahy book.