Not all heroes wear capes.

Some accessorize with glitter, fart spray and the element of surprise.

You may remember Mark Rober, the former NASA engineer who rose to YouTube fame last year after a $5 package was stolen from his doorstep. His mission: to exact a little justice by leaving booby-trapped boxes outside homes — and making it very, very clear to any would-be thief that he or she had messed with the wrong porch.

On Sunday, Rober unveiled a souped-up version of his creation, one he spent 11 months engineering with the same precision he put into the Curiosity Mars rover. A YouTube video viewed more than 10 million times breaks down how the “glitter bomb” works and features bonus footage of real-life thieves who meet their smelly fates.

This time around, Rober scored the endorsement of his glitter bomb muse: actor Macaulay Culkin, who rose to fame in “Home Alone” playing a schoolboy who outwitted a pair of burglars. He makes a cameo in the video and even takes the fart spray for a test run to ensure optimal … effect.

Rober is a YouTube sensation and spends much of his time making videos of quirky science experiments. But his porch protection program comes as holiday packages are circling the country in droves. Between Thanksgiving and Jan. 1, the U.S. Postal Service expects to ship more than 800 million packages. Last year, a study by InsuranceQuotes estimated that about 26 million Americans have had a holiday package stolen.

The new and improved glitter bomb includes a circuit board and four phones that record the sting from all sides and upload footage to the cloud. Thieves will be most stunned by the surge of glitter (which is biodegradable) and the rush of re-engineered fart spray. Sound effects include a countdown clock and fake police scanner chatter.

The idea is for thieves to toss the packages, which are designed to look like expensive headphones, out their doors. The phones provide tracking information so the boxes can be retrieved and redeployed on another mission.

To test glitter bomb 2.0, Rober sent out a call to his social media followers. He heard back from 400 people who’ve had packages stolen, and then he chose a handful to take the new model for a spin.

There were some kinks: one package ended up riding around in a UPS truck. Another leaked glitter.

“Then the thefts began to pile up, and we started hitting our stride,” Rober said in the video.

After Rober unveiled the glitter bomb last year, he had to re-edit the video after learning some of the footage was staged. He’d put out a call for volunteers, offering to pay people to lay the bait and retrieve the stolen packages later on.

But in some cases, the “thieves” were “actually acquaintances of the person helping me,” Rober said at the time.

This year, Rober said, one of the volunteers swiped a package with no intention of setting the trap or returning it.

“What do you think I’m going to do to the guy who steals the outcome of that year and a half of work,” Rober said in his video with a laugh. “I quit my job at NASA to make YouTube videos.”

And so, Rober ordered $300 of starting course materials from Scientology and shipped it to the person’s house. He also sent an array of quirky, if not controversial, postcards to a slew of the volunteer’s neighbors.

Still, even a blast of sparkly powder and unwanted odor can expose the humanity in mankind. Some people spotted the mystery packages and used the phony contact information written on the side to ensure a safe delivery. The calls, of course, went to Rober, who gave the good Samaritans $400 — and a personal thank-you.