Hadithcore
Mishkat al-Masabih, 1144

Anas reported God’s Messenger as saying, “If anyone prays to God for forty days in congregation being present in time for the first <i>takbira</i>, two immunities will be recorded for him, one from hell and one from hypocrisy,” Tirmidhi transmitted it.

وَعَنْ أَنَسٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ:

مَنْ صَلَّى لِلَّهِ أَرْبَعِينَ يَوْمًا فِي جَمَاعَةٍ يُدْرِكُ التَّكْبِيرَةَ الْأُولَى كُتِبَ لَهُ بَرَاءَتَانِ: بَرَاءَةٌ مِنَ النَّارِ وَبَرَاءَةٌ مِنَ النِّفَاق

. رَوَاهُ التِّرْمِذِيّ

References1 variant
In-Book Reference
Book 4, Hadith 561