Updated

The man who hacked into the iCloud accounts of hundreds of people, including that of Jennifer Lawrence and Kate Upton, was sentenced Wednesday, the Justice Department announced.

George Garofano, 26, of Connecticut, will serve eight months in prison after he pleaded guilty in April to unauthorized access to a protected computer to obtain information.

PRINCE HARRY BUSTED BY HALLE BERRY AFTER THROWBACK PHOTO REVEALS CUTOUT OF HER HANGING IN TEEN DORM ROOM

Prosecutors said that between April 2013 and October 2014, Garofano sent emails that appeared to be from Apple that encouraged victims to disclose their usernames and passwords, or "to enter them on a third-party website, where he would later retrieve them."

Garofano then used that information to hack into roughly 240 iCloud accounts.

The case stemmed from the investigation into the 2014 scandal in which private photos, from Lawrence, Upton, Ariana Grande and Kirsten Dunst, were leaked to the public.

'JERSEY SHORE' STAR PAULY D ADDRESSES EX AUBREY O'DAY'S ALLEGED AFFAIR WITH DONALD TRUMP JR.

Many people who live in Connecticut and are not celebrities were also hacked, according to federal officials.

Garofono is out on a $50,000 bond but is expected to begin the prison sentence in October. He was also ordered to perform 60 hours of community service during his three-year supervised release following his jail time.

He faced up to five years in prison.

The Associated Press contributed to this report.