This is an excerpt from the life of St. Andrew the Fool-for-Christ (see the Great Synaxaristes for the full life of the Saint in English). When he began to act like a fool after God's call, his master thought that he had become possessed, so he had him bound with chains, and placed in the holy church of St. Anastasia the Deliverer-from-Potions in Constantinople, which was known for its many miracles and healings. What is moving about this passage is the speedy help of St. John the Evangelist and Theologian, and the vivid depiction of spiritual warfare. St. John is not physically "flogging" the bodiless demons, but the demons experience this punishment when coming into contact with the great love, purity and humility of the Triune God and of His Saints. May the Lord protect and defend us all from the demons, through the prayers of His Holy Ones!
St. Andrew the Fool-for-Christ's Vision of St. John the Theologian
And immediately, he added: “O St. John, Apostle and Evangelist, Beloved Theologian, help me.”
At that instant, from on high was heard the roaring of thunder*. And an Elder with large eyes appeared, whose face shown like the sun! Many were following him. He made the sign of the Cross in the air, and told those with him: “Lock the doors, so that none might escape!”
Those with him [i.e. the Angels] speedily seized all the demons. As they were all locked within the church, the demons cried to each other: “How dark is the hour that we are experiencing! John is strict and will torture us terribly.”
That precious Elder gave a command to his attendants to take the chain from the neck of the blessed Andrew. He took it, and stood outside the door and cried out: “Bring each of them to me.”
And they brought him the first one. “Lay him down,” he said.
Then, he folded the chain of the blessed one in three, and gave around 100 strikes to the demon, who cried out like a man: “Mercy, mercy, have mercy on me!”
Later they laid out and terribly flogged the second, followed by each of the demons. When the blessed Andrew heard the word “mercy”, he began to laugh. It appeared to him that the demons were bound and flogged perceptibly just like men. In reality, however, God was flogging them. And he was flogging them with such an astonishing beating, such that human nature couldn't bear it.
He who was flogging them cried out: “Go now to your father, to satan, and show him the predicament that you are in and see if it pleases him...”
“Tell me, O Lord,” the blessed Andrew asked, “who are you? I don't recognize you.”
As he said this, he disappeared like lightning from before his eyes. He remained ecstatic, and glorified God, because He helped him and delivered him from those evil demons that had surrounded him. He prayed, therefore, and said:
“O Lord Jesus Christ, great and unsurpassing is Your power, and greatly glorified is Your compassion, for strangely and wondrously did you have mercy on and take care of your humble servant. O exalted and almighty Lord, ever protect me on Your true way, and make me worthy, O greatly-merciful Master, O awesome and incomprehensible One, to find grace near You.”