Archive

Archive for May, 2011

The Battle of Veridian III

May 3rd, 2011 1 comment

I may be crucified for saying this, but after thinking about it, I believe Riker made a grievous tactical error at the Battle of Veridian III, which, had he played it differently, could have saved the Enterprise-D.

Riker’s strategy was to perform evasive maneuvers and essentially take pot-shots at the bird-of-prey.  This proved largely ineffective, as we saw by the massive damage to the Enterprise ultimately resulting in her destruction.

What he forgot was that the bird-of-prey is not a particularly tough ship.  They’re designed to be nimble and stealthy for quick hit-and-run attacks.  A Galaxy class starship will never out-run or out-maneuver a bird-of-prey at sublight speeds.  The Galaxy class, however, is a fairly durable design, often used as a staple in large fleet actions.

All things considered, when the first volley hit, MY orders would have been: forget the shields, divert all shield power and anything else we can spare to weapons and close to point-blank range, maintaining continuous fire.  The shields were worthless at this point, so why did Riker waste the energy to maintain them?  Diverting the shield power to weapons would’ve given the Enterprise a massive punch and would’ve collapsed the relatively weak bird-of-prey’s shielding quickly, and once that’s done, we’ve seen repeatedly how quickly a bird-of-prey can be torn to shreds by even a single photon torpedo.  Even if the bird-of-prey had opted  to out-maneuver the Enterprise with this strategy, they would have been giving the Enterprise a lot more room to breathe and (as the bird-of-prey’s weaponry only has forward firing arcs) wouldn’t have been able to maintain the near continuous fire on the Enterprise that they had during the battle.

Why did Riker, a trained, decorated and seasoned Starfleet officer not think of this, and I, while grocery shopping, did?  :(

Categories: Geekery, Randomness Tags:

Exponent registration bug patcher

May 3rd, 2011 No comments

In response to a recent ExponentCMS security vulnerability which allows a cross-site script injection to allow anybody to create a new admin user, I’ve written the following script that will automatically apply the necessary patch.  
Suggested usage:


find /home/*/public_html/framework/datatypes -name user.php -exec python fixRegBug.py {} \;

 


#!/usr/bin/env python
# encoding: utf-8
"""
fixRegBug.py

Created by Ron Miller on 2011-05-03.
Copyright (c) 2011 Youcentric Solutions. All rights reserved.
"""

import sys
import os

def main():
	if sys.argv[1] is None:
	    print "Please specify path to user.php"
	    exit(255)
	oldfile = open(sys.argv[1], "r")
	newfile = open(os.path.join(os.path.dirname(sys.argv[1]), "user.new.php"), "w")
	for line in oldfile:
	    if "if(isset($params['is_admin']) || isset($params['is_acting_admin'])) $this->checkAdminFlags();" in line:
	        line = "\t$this->checkAdminFlags();"
	        newfile.write(line)
	        newfile.flush()
	        print "Found and fixed vulnerability in %s" % sys.argv[1]
	    else:
	        newfile.write(line)
	        newfile.flush()

	newfile.close()
	oldfile.close()
	os.rename(sys.argv[1], os.path.join(os.path.dirname(sys.argv[1]), "user.old.php"))
	os.rename(os.path.join(os.path.dirname(sys.argv[1]), "user.new.php"), sys.argv[1])

if __name__ == '__main__':
	main()
Categories: Linux, Servers Tags:

dork-e.com is Stephen Fry proof thanks to caching by WP Super Cache