Los Angeles: 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 those of 30 celebrities. Federal prosecutors shared the information on 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, reports variety.com. 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 US Attorney’s Office here. “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 user names and passwords from his victims. According to the plea agreement, Majerczyk would send emails from accounts lik “[email protected]” or “[email protected]” thinking the emails were legitimate, the victims would click on the links and type in their user names 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 here, 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.