Question: What is the definition of the sorcerer (sāḥir), the soothsayer (kāhin), and the astrologer (munajjim) whom it is not permissible to visit, as in the ḥadīth: “Whoever goes to a soothsayer…” etc.? And does this include the man who goes to someone said to inform about the place of a theft and the thief, and the like?
Answer: The scholars of the madhhab have defined the sorcerer, as in al-Bayān and other works, by saying: The sorcerer is one who presents himself as being able to alter creation, to turn a human being into an animal and the reverse, and to turn an inanimate object into an animal – this is how they stated the definition of the sorcerer.
As for the soothsayer, he is one who presents himself as having knowledge of future events.
And the astrologer is one who informs about unseen matters by means of his knowledge of the stars.
These three must not be believed in what they say and claim, because what they claim does not occur except from Allah, Exalted is He.
Furthermore, the person who informs about a theft and its thief should not be believed.
What is known about such a person is that he only informs by means of an egg or something similar, in which he writes, then has a child who has not yet reached puberty look into it. The child then sees the thief as he takes the stolen property, and so on. It is not permissible in the Sharīʿah to rely on such a thing.
What the child sees in the egg or the like is perhaps an image produced by the jinn. Someone who tried this repeatedly informed me that it became clear to him that what appears in the egg or the like is neither true nor in accordance with reality.
Accordingly, whatever is like this is neither sorcery nor soothsaying nor astrology; however, it is not permissible to rely on it nor to act upon it.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2