I wanted to ask about how rape is convicted. From my knowledge, there needs to be 4 witnesses. But in society, 99.9999% of rapes are only between the victim and the rapist, they usually happen without anyone else's knowledge away from others.
Like I know a woman who was molested by a family friend, and she confided in me over it. But it happened when she was left home alone with that friend, everyone was gone.

How can rape be convicted when it's usually done away from others? Can the victim be examined (by people of the same sex obviously)? Can DNA evidence and/or camera evidence be taken if possible? Can the person take a solemn oath to Allah Azza wa Jal and/or invoke His wrath on them if they're telling a lie?

Yes rape can be convicted using modern forms of technology such as a DNA test. So even if there are no 4 witnesses, if it’s proven beyond doubt that the rapist is punished in Islamic Law. Any way that generates certainty to the Muslim judge. It can be through a recording, DNA, or any other method that gives certainty that she was raped.