Two people have been attacked by a shark at Catseye Beach on Hamilton Island in north Queensland.