A 28-year-old Chicago man has agreed to plead guilty to hacking into the Apple iCloud and Gmail accounts of over 300 people, including the accounts of 30 celebrities, federal prosecutors said Friday. Edward Majerczyk faces up to five years in prison, though the plea agreement anticipates a sentence in the range of six to 12 months.

The case is the second to arise from “Celebgate,” the 2014 hacking scandal in which intimate photos of numerous celebrities were posted online. In March, federal authorities announced that Ryan Collins, 36, of Pennsylvania, had agreed to plead guilty to hacking into the accounts of 100 people, including some celebrities, and downloading nude photos and videos.

However, prosecutors have said they have no evidence that either Collins nor Majerczyk posted the hacked material online. The investigation is still ongoing, said Thom Mrozek, a spokesman with the U.S. Attorney’s Office in Los Angeles.

Though the charges against both men are very similar, Collins and Majerczyk were apparently operating independently, Mrozek said. Each is accused of using a phishing scam to obtain usernames and passwords from his victims. According to the plea agreement, Majerczyk would send emails from accounts like “appleprivacysecurity@icloud.com” or “appleprivacy@icloud.com.” Thinking the emails were legitimate, the victims would click on the links and type in their usernames and passwords.

Majercyzk would then use that information to access the victims’ iCloud and Gmail accounts and download “sensitive and private photographs and videos,” according to the plea.

Majercyzk was charged by prosecutors in Los Angeles, but the case will be transferred to Illinois for the entering of the plea and sentencing, which are expected within the next few weeks. Collins has also not yet been sentenced, though prosecutors recommended a term of 18 months in prison.

As many as 100 celebrities, including Jennifer Lawrence, Kirsten Dunst and Kate Upton, were targeted in the massive leak of photos in September 2014.