NEW YORK (Reuters) - A Florida man pleaded guilty in a case stemming from an attempted hacking of the Clinton Foundation on Thursday, months after he was sentenced to 42 years in prison in the wake of child pornography discovered on his computers during the probe.

FILE PHOTO - Timothy Sedlak , sentenced by U.S. District Judge Roy Dalton in Orlando after a federal jury in May found him guilty on charges including that he produced and possessed child pornography, is pictured in this undated booking photo. Courtesy Seminole County Sheriff's Office/Handout via REUTERS

Timothy Sedlak, 43, pleaded guilty in federal court in Manhattan to attempting to access protected computers without authorization. Prosecutors accused him of trying to gain access to an unnamed New York-based charitable organization’s network.

“I knew that what I was doing was wrong,” Sedlak said in court.

Neither prosecutors nor Sedlak named the organization from which he tried to get access to emails.

In a court filing obtained by Reuters that summarized a U.S. Secret Service interview in 2015 with Sedlak, an agent said he was questioned about notes they found referencing former Democratic presidential candidate Hillary Clinton and her daughter, Chelsea Clinton.

Sedlak, who called himself a private investigator, told the agents he was researching whether charities were unintentionally providing funding to Islamic militant groups, and said the Clintons “came up in his research,” the filing said.

The filing’s description of the Clintons matched prosecutors’ descriptions of two previously unnamed individuals who were said to be executives at the charity and an “individual who has been publicly affiliated” with it.

Chelsea Clinton is the vice chair of the foundation, which was started by her father, former U.S. President Bill Clinton. Its full name is the Bill, Hillary & Chelsea Clinton Foundation.

The filing was downloaded by Reuters on Feb. 3. It was later replaced by a redacted version removing the Clintons’ names.

Clinton Foundation representatives did not respond to requests for comment.

The investigation into Sedlak, of Ocoee, Florida, predated probes into cyber attacks on Democrats during the 2016 presidential election.

U.S. intelligence agencies in January released an assessment indicating that Russian President Vladimir Putin had ordered cyber attacks to help Republican Donald Trump’s electoral chances by discrediting Clinton.

Sedlak launched about 390,000 unsuccessful attempts to gain unauthorized access to the charitable organization’s computer network, according to prosecutors.

Following his arrest in 2015, authorities discovered files on his computers containing child pornography, including images depicting Sedlak sexually abusing a toddler, prosecutors said.

Sedlak was separately charged in Florida, where a federal jury in Orlando in May found him guilty of charges he produced and possessed child pornography. He was sentenced in August to 42 years in prison.