וַיְהִי֩ בַיּ֨וֹם הַשְּׁלִישִׁ֜י בִּֽהְיוֹתָ֣ם כֹּֽאֲבִ֗ים וַיִּקְח֣וּ שְׁנֵֽי־בְנֵי־יַ֠עֲקֹב שִׁמְע֨וֹן וְלֵוִ֜י אֲחֵ֤י דִינָה֙ אִ֣ישׁ חַרְבּ֔וֹ וַיָּבֹ֥אוּ עַל־הָעִ֖יר בֶּ֑טַח וַיַּֽהַרְג֖וּ כָּל־זָכָֽר׃
And it was on the third day, when they were in pain, that two of the sons of Yaakov, Shimon and Levi, brothers of Dinah, each took his sword and came upon the city securely, and they killed every male.
Torah Temimah points to discussions of the number of participants.
שני בני יעקב שמעון ולוי — רק שניים.
“Two of the sons of Yaakov, Shimon and Levi” — only two.
The verse specifies that only two brothers carried out the attack.
Derash on the participants (continuation).
Only Shimon and Levi took part in the killing of the males of the city.