Judge praises 'courageous attempts' to fight attacker.