Where is it stated that rape was permitted in the Torah?
Judges 21:
15 The people grieved for Benjamin, because the Lord had made a gap in the tribes of Israel. 16 And the elders of the assembly said, “With the women of Benjamin destroyed, how shall we provide wives for the men who are left? 17 The Benjamite survivors must have heirs,” they said, “so that a tribe of Israel will not be wiped out. 18 We can’t give them our daughters as wives, since we Israelites have taken this oath: ‘Cursed be anyone who gives a wife to a Benjamite.’ 19 But look, there is the annual festival of the Lord in Shiloh, which lies north of Bethel, east of the road that goes from Bethel to Shechem, and south of Lebonah.”
20 So they instructed the Benjamites, saying, “Go and hide in the vineyards 21 and watch. When the young women of Shiloh come out to join in the dancing, rush from the vineyards and each of you seize one of them to be your wife. Then return to the land of Benjamin. 22 When their fathers or brothers complain to us, we will say to them, ‘Do us the favor of helping them, because we did not get wives for them during the war. You will not be guilty of breaking your oath because you did not give your daughters to them.’”
23 So that is what the Benjamites did. While the young women were dancing, each man caught one and carried her off to be his wife. Then they returned to their inheritance and rebuilt the towns and settled in them.
Numbers 31:
13 Moses, Eleazar the priest and all the leaders of the community went to meet them outside the camp. 14 Moses was angry with the officers of the army—the commanders of thousands and commanders of hundreds—who returned from the battle.
15 “Have you allowed all the women to live?” he asked them. 16 “They were the ones who followed Balaam’s advice and enticed the Israelites to be unfaithful to the Lord in the Peor incident, so that a plague struck the Lord ’s people. 17 Now kill all the boys. And kill every woman who has slept with a man, 18 but save for yourselves every girl who has never slept with a man.
Deuteronomy 20:
10 When you march up to attack a city, make its people an offer of peace. 11 If they accept and open their gates, all the people in it shall be subject to forced labor and shall work for you. 12 If they refuse to make peace and they engage you in battle, lay siege to that city. 13 When the Lord your God delivers it into your hand, put to the sword all the men in it. 14 As for the women, the children, the livestock and everything else in the city, you may take these as plunder for yourselves. And you may use the plunder the Lord your God gives you from your enemies.
Zechariah 14:
A day of the Lord is coming, Jerusalem, when your possessions will be plundered and divided up within your very walls.
2 I will gather all the nations to Jerusalem to fight against it; the city will be captured, the houses ransacked, and the women raped. Half of the city will go into exile, but the rest of the people will not be taken from the city.
If you want to make justifications for each of these, they have been heard before. The fact remains that God condones such actions instead of preventing or even just condemning them.