In the new James Bond thriller, "Skyfall," the villain is a cyberterrorist, a disgruntled former British agent who's trying to crash the known digital universe. It's a nice touch, creating a very real, very terrifying scenario that "could paralyze the nation," as Defense Secretary Leon Panetta warned just last month.

And that is about the only aspect of the movie that is likely to be accurate.

Don't get me wrong - I'm a fan of the Bond movies. I go to see them for the same reasons everyone else does: the gorgeous women, the most beautiful places on Earth and, of course, the roller-coaster ride of a plot. I delight in Bond's complete defiance of gravity. His suits never wrinkle, his Aston Martin is never in the garage for repairs, the girls never say no.

But as a former spy, what I like most about the Bond movies is the way good always triumphs over evil. His cases end neatly, with the villain dispatched and the world safe for the good guys.

Real-life espionage is a lot less sexy - and a lot messier.

Sometimes, age-old wisdom notwithstanding, the enemy of our enemy turns out not to be our friend. In the mid-1980s, I was handed the portfolio for Libya's opposition leaders, the folks we hoped would bring down Moammar Gadhafi.

Late one night, I woke up to the sound of the butts of assault rifles pounding my door. Two of my Libyan contacts were on the run from Gadhafi's assassins. We talked most of the night. I came to understand that the people we'd picked to replace Gadhafi were Salafists determined to turn Libya into an Islamic republic. They didn't succeed then, but you can see the people who attacked our embassy in Benghazi in September as their linear descendents.

While occasionally I found myself in a Bond-like setting, the story inevitably unfolded with a lot less panache.

One time, in pursuit of an elusive informant, the agency sent me to Monaco to troll the Casino de Monte-Carlo. The CIA scoffed at the idea of buying me a tuxedo, and the dragon lady who did our accounting refused to give me a cent to put on the roulette table. As soon as I walked into the casino in my penny loafers, the security goons spotted me as an impostor and pulled me over for a polite interrogation. I never found our would-be informant, but I did come away with the certainty that I wasn't James Bond.

Anyone who's passed through Langley will tell you that a spy's life is one of tedious endurance. It's long hours of cubicle living, going through the same files everyone else in the office has gone through, hoping to catch a missed lead. As CIA-operative-turned-novelist Charles McCarry said, spying is nothing more than an organized hunt for a windfall.That translates to waiting for that one "walk-in" who comes knocking on the agency's door ready to hand over the crown jewels.

Now and then, Bond moments do come along. The CIA operatives who located Osama bin Laden and self-proclaimed Sept. 11, 2001, mastermind Khalid Sheik Mohammed can tell you all about them. And tragedies such as the recent attack in Benghazi are few and far between.

Much of a spy's work these days is wading through data and breaking into computers. No doubt the geeks who threw the Stuxnet monkey wrench into the Iranian nuclear works didn't move far from their computer screens for months. The most dangerous part of the day was probably going for Chinese takeout.

Another recent movie evokes this ethos much better than any Bond movie. "Argo," the tale of the CIA's rescue of six Americans during the Iran hostage crisis, is grittier and grimmer and captures the air of monotonous procedure punctuated by moments of sheer terror.

I managed to end up on the periphery of the hostage crisis and spent a couple of days at the American Embassy in Tehran only months before the takeover. As I watched the opening sequences of "Argo," I did a double-take; the embassy interiors were exactly as I remembered them. So were the two rescued Americans I knew, Kathy and Joe Stafford.

Although those embassy employees in "Argo" really did get out, the larger story did not have such a neat ending. The Iran hostage crisis included a failed rescue attempt and ended with the United States humbled rather than triumphant. As for "Argo's" protagonist, Tony Mendez, I'm sure he went back to his desk to file a monster expense account. It must have taken him days.

Robert Baer is a former CIA case officer and the author of several books on the Middle East.