South African skipper Faf du Plessis hit a hundred as South Africa thrashed Australia in the second ODI to take a 2-0 lead in the five-match series.