Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Sunday, 7 October 2012

Ukarainian Way of Rotating IPs

Note: original IP addresses are changed to the fake ones according to RFC 5737.

Once upon a time one of my ex-employers texted me a call for help. A recently installed dedicated server used to go offline time after time.

Challenge accepted.

Wednesday, 25 April 2012

Were We Redirected?

I found this one in a custom piece of shit software (luckily, not in a widespread CMS or something). That was a grabber. Sure, there were some redirects while crawling websites. And, ladies and gentlemen…
The most stupid way to check for redirect I've ever seen:
stripos($result, "<head><title>Document Moved</title></head>") !== FALSE

Then guy tries to figure out what's the address he's been sent to:
reg_match( "#(?i)<a HREF=\"(.+?)\">#", $result, $href );
Nothing to add, really. Enough said.

Tuesday, 24 April 2012

Rewrite Rules From phpprobid's .htaccess

RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]

RewriteRule ^(.*),(.*)$ $2.php?rewrite_params=$1&page_url=$2  


Which is more weird, this shit costs a fortune (well, not exactly a fortune, but way too much considering its crappiness) and tends to be “Professional Auction Script Software”, my arse!