The al-Shabab armed group has taken claim for two attacks in Somalia, one in Mogadishu and the second in Puntland.