Thomas Jefferson dealt with the Barbary Pirates with invasion, and burning of their cities. In and out.
Nowadays, I think just turning one aircraft carrier loose for a single day with orders to blow up anything floating, transmitting, or rolling would do the trick. Would take them years to recover.
I'm talking PEST CONTROL!!