The greatest single problem facing those who wish to wipe out Somali pirates is "legal restrictions". Those who wiped out piracy in the past had no such BS restrictions. Piracy doesn't warrant any legal protection... just a good dose of HE ordnance or many multiple rounds of large calibre bullets.
BBC - Somali pirates live the high life...
BBC NEWS | Africa | Somali pirates living the high life
BBC - Can Somali pirates be defeated?...
BBC News - Can Somali pirates be defeated?
The answer to the last question shouldn't involve any navel-gazing or considerations about possibly causing pain, to some people not directly involved in piracy. All Somalis support piracy, directly or indirectly.
BBC - Inside story of a Somali pirate attack...
BBC NEWS | Africa | Inside story of Somali pirate attack
The simple technique of declaring war on Somali pirates will solve any "legal" ramifications. Under world-recognised Geneva Conventions, after a declaration of war, there are only 4 basic reasons needed to shoot to kill... otherwise known as the Rules of Engagement...
1. The enemy is wearing a recognised combatant style of dress or uniform...
2. The enemy refuses to stop when challenged...
3. The enemy fires on you...
4. The enemy is armed and threatening you...