text: The republic was run by Barbary pirates who used the two cities as base ports for launching attacks on shipping .
simplified: The republic was run by Barbary pirates who used the two cities as base ports for starting attacks on shipping .