Mishkat al-Masabih
Mishkat al-Masabih 4595
Arabic hadith text
وعن حفصة قالت : قال رسول الله صلى الله عليه وسلم : " من أتى عرافا فسأله عن شيء لم تقبل صلاة أربعين ليلة " . رواه مسلم
Translation
It is related from Hafsah that the Messenger of Allah (may Allah bless him and grant him peace) said, “Whoever goes to a diviner and asks him about something will have no prayer accepted for forty nights.” Muslim transmitted it.