Another interpretation of (Exodus 7:9) "When Pharaoh speaks unto you, <saying: Produce a wonder for yourselves, then you shall say unto Aaron: Take your rod and cast it down before Pharaoh; it shall become a serpent>": This is what Scripture says (Proverbs 29:11), "A fool vents all his spirit, but a wise man stills it in the end." One who is a knave or a fool comes to quarrel with his fellow and brings out all the words that he has; but since the other is wise, in the end he dismisses him. Another interpretation of "A fool vents all his spirit": Who is this? This is Pharaoh. When Moses and Aaron went to him, the Holy One, blessed be He, said to them: Before you go to him, I am telling you what he is going to do and what he will ask of you. (Exodus 7:9) "When Pharaoh speaks unto you" — only be careful. (Ibid.) "And you shall say unto Aaron: Take your rod <and cast it down before Pharaoh>." When they went to Pharaoh, he said: Produce a wonder for yourselves. Immediately (Exodus 7:10) "And Aaron cast down his rod." At that moment Pharaoh laughed at them. He said to them: Moses and Aaron, what do you suppose, that you have come to mock me? But I am not afraid of these things. All of Egypt is full of sorceries. There are those who bring straw to Afarayim, and fine gold to Rekem.
Pharaoh Mocks the Rod of Aaron as Egyptian Sorcery
Midrash Tanchuma Buber, Vaera 12:1
ד"א כי ידבר אליכם פרעה וגו', זש"ה כל רוחו יוציא כסיל וחכם באחור ישבחנה (משלי כט יא), מי שהוא אויל או כסיל בא להריב את חבירו ומוציא דברים שיש לו וכיון שהוא חכם באחרונה הוא מסלקו. ד"א כל רוחו יוציא כסיל, מי זה, זה פרעה, כיון שהלכו משה ואהרן אצלו, אמר להם הקב"ה עד שלא תלכו אצלו אני אומר לכם מה שהוא עתיד לעשות ושואל לכם, כי ידבר אליכם פרעה, אלא הוו זהירין, ואמרת אל אהרן קח את מטך וגו' (שמות ז ט), כיון שהלכו אצל פרעה, אמר תנו לכם מופת, מיד וישלך אהרן את מטהו (שם שם י), באותה שעה שחק פרעה עליהם אמר להם משה ואהרן מה אתם סבורים שבאתם לשחק עלי, אלא איני מתיירא מן הדברים האלו, כל מצרים מלאה כשפים, יש מוליכין תבן לעפרים, כתם לרקם.