Former Obama defense secretary and CIA director Leon Panetta says perceived “weakness” encouraged Russian President Vladimir Putin to direct cyber-attacks against the United States and interfere with the 2016 election.

In an exclusive interview with Fox News, Panetta responded to Washington Post reporting over the weekend that the Obama administration “choked” in response to Russia's interference, even after the CIA told then-President Barack Obama the meddling was directed by Putin.

“I think when [Putin] conducted the cyber-attacks in the United States during the last election, he felt he could get away with it, without any kind of response,” Panetta said. “If there's anything I've learned in dealing with the Russians, it's that you have to show them that there's a line beyond which they cannot cross.”

President Trump responded in a tweet to the Washington Post story, asking why Obama didn't do more to stop the Russians.

“The real story is that President Obama did NOTHING after being informed in August about Russian meddling...” he wrote.

Trump’s tweet has raised questions about whether the president now believes Russia interfered with the U.S. election despite having denied such interference after being briefed by U.S. intelligence chiefs in January.

Panetta said Putin took advantage of perceived American "weakness."

“He's somebody who takes advantage of weakness, and if he senses weakness then he'll take advantage of it,” Panetta said, giving the example of Russia’s invasion of Ukraine and annexation of Crimea.

Panetta also voiced concerns about more Russia revelations making their way into the press, including the The Washington Post’s reporting on a highly classified order given by Obama to place “cyber weapons in Russia’s infrastructure, the digital equivalent of bombs that could be detonated if the United States found itself in an escalating exchange with Moscow.”

“I’m very concerned that frankly there is too much leaking of classified information,” Panetta said.

“Even the president of the United States is talking about classified information to the Russians. All of that is dangerous because what it does is it jeopardizes the very sources we need in order to provide intelligence to leadership of this country,” he added.

Panetta thinks too many U.S. government officials are handling classified information with “too much carelessness.”

On the broader subject of cyber-warfare, Panetta said massive theft like the email hack of the Democratic National Committee and one of Hillary Clinton’s top advisers represents the “battlefield of the future.” As defense secretary, Panetta was the first to warn of a future “cyber-Pearl Harbor.”

“What we all have to recognize the use of a sophisticated virus could take down and virtually paralyze our country,” Panetta warned.

Watch more of former defense secretary and CIA director Leon Panetta’s interview all this week on “Special Report with Bret Baier” as Jennifer Griffin covers all the world’s hotspots where US military troops are deployed “On The Frontlines.” Part II of “On the Frontlines” airs Tuesday at 6 p.m. ET and will include a look at US troops on the frontlines in Iraq and Syria.