O ye who believe! enter not houses other than your own, until ye have asked permission and saluted those in them: that is best for you, in order that ye may heed (what is seemly). (24:27)

If ye find no one in the house, enter not until permission is given to you: if ye are asked to go back, go back: that makes for greater purity for yourselves: and God knows well all that ye do. (24:28)

It is no fault on your part to enter houses not used for living in, which serve some (other) use for you: And God has knowledge of what ye reveal and what ye conceal. (24:29)