Australian surfer Mick Fanning survived a shark attack unscathed after punching the predator in South Africa.