An introverted university student - who was motivated by revenge to hack into campus computers and change the records of two fellow students - was sentenced on Friday afternoon to 80 hours of community service. Yung Man-hang, 21, now a temporary research assistant at the Chinese University's biology department, pleaded guilty to six counts of obtaining access to a computer with dishonest intentions between February and September last year. The Eastern Court heard that Yung, a student during the period, had installed spying software known as 'invisible keylogger' in three computers at the university student union. This was to obtain the logins and passwords of the two students, the court heard. The software can record all keystrokes on a remote computer and send reports to a specified e-mail address. Yung then accessed the system to alter the victims' addresses, telephone numbers and course registration records. He did so for revenge as the pair rejected his bid to become a representative of the student union, the court heard. But Yung did not gain financially or cause financial losses to the victims. His counsel Allan To told the court the student had also written letters to the victims to apologise for his actions. Psychiatric reports found Yung suffered depression and received treatment at Prince of Wales Hospital over the past months. The court heard Yung was introverted, had inadequate support from his family and was reluctant to make friends. In sentencing Yung, Magistrate Winston Leung Wing-chung ruled out a jail term. Mr Leung said he was satisfied Yung committed the crime out of a 'momentary foolishness'. The magistrate said he hoped a community service term would help Yung reform and allow him to seek help. 'It is sad that the defendant could not face up to failure when his bid to join the student union was rejected, and used disgraceful tactics to extract revenge,' Mr Leung said. 'Though many young people nowadays, such as you, have a talent for computer technology, they should remember that they could never live only in the virtual world. True success lies in achievements in the real world,' the magistrate said.