Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:12517Abū ʿAbdullāh al-Ḥāfiẓ > Abū al-ʿAbbās > Yaḥyá > Yazīd > Khālid b. Yazīd al-Hadādī > Ṣāliḥ al-Dahhān or Salamah b. Kulayb > Suʾil Jābir b. Zayd > al-Khunthá Kayf Yuwarrath

[Machine] He approaches a wall and then urinates. If he hits the wall, he is a boy, but if it flows between his thighs, he is a girl. It has been narrated in a weak hadith with a weak chain of narration.  

البيهقي:١٢٥١٧وَأَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو الْعَبَّاسِ ثنا يَحْيَى أنا يَزِيدُ أنا خَالِدُ بْنُ يَزِيدَ الْهَدَادِيُّ عَنْ صَالِحٍ الدَّهَّانِ أَوْ سَلَمَةَ بْنِ كُلَيْبٍ قَالَ سُئِلَ جَابِرُ بْنُ زَيْدٍ عَنِ الْخُنْثَى كَيْفَ يُوَرَّثُ فَقَالَ

يَقُومُ فَيَدْنُو مِنْ حَائِطٍ ثُمَّ يَبُولُ فَإِنْ أَصَابَ الْحَائِطَ فَهُوَ غُلَامٌ وَإِنْ سَالَ بَيْنَ فَخِذَيْهِ فَهُوَ جَارِيَةٌ وَقَدْ رُوِيَ فِيهِ حَدِيثٌ مُسْنَدٌ بِإِسْنَادٍ ضَعِيفٍ