A 12-year-old Chinese ‘hacking prodigy’ broke into his school’s computer system and a shopping website, but claims he’s only doing it to help fix security flaws.

Wang Zhengyang hacked into his school’s system, then notified the software company of a security flaw that affected other schools using the program.

However, Wang points out he hacked into high school records, not his own, reports Want China Times.

CCTV reports Wang is also a first-year student at Tsinghua University, and that he began hacking to avoid doing his homework.

But he says it’s all to help websites improve their security, and that he is a moral hacker, or ‘white hat’.

“I meant to help fix the websites,” he told the Chinese Internet Security Conference in Beijing late last month.

“You have to attack the websites first to find its weaknesses.”

He also hacked into an online store, changing price of one item from 2500 yuan to 1 yuan, reports Shanghaiist.

Instead of buying the discounted item, he contacted the online store to alert them to the security breach.

“I think those who hack all day for profit are immoral,” he said.

“It is interesting to look for website security risks and I am overwhelmed with joy when I find one. But I will not use my talent for something illegal.”