Whilst I have not been to either of those places after the revolution, Libya certainly used to be a country where cash was far more widely accepted than credit cards. Handling and HOTAC was all paid for with cash when I was there in 2009 and I doubt if anything has changed.