Detecting Screen Orientation Change

May 2, 2016

Browsers provide different means to detect screen orientation:

Documentation in the Mozilla Developer Network (linked above) states the first to be deprecated but currently still in the WhatWG Living Standard, whereas its documentation on the latter differs from the W3C documentation.

According to documentation, detection of screen orientation change can be achieved by implementing handlers for the events

  • window.orientationchange
  • screen.orientation.change
  • window.matchMedia() listener
  • window.resize

but specific browsers may not support all of these events, with window.resize being the catch-all solution if everything else fails.

So based on SO answers and this blog and this blog I came up with a solution that currently seems to work, and a couple of findings:

  • window.orientation gives the angle on mobile browsers only – desktop browsers always contain 0 (zero).
  • Similarly, window.onorientationchange is only supported by mobile browsers.
  • screen.orientation (and its browser-spezific siblings mozOrientation and msOrientation) contains the angle in its angle property. IE11 does support support screen.orientation on Win7. Mobile Chrome (35) and the Android 4.4.2 Browser do not seem to support it either.
  • Of the browsers I tested, none seem to implement the event screen.orientation.onchange.
  • Orientation change can be detected using the window.matchMedia() listener on both mobile and desktop browsers which support mediaqueries and its orientation selector.
  • In desktop browsers, orientation can only be derived from $(window).width() and $(window).height(), or from the .matches property of a matchMedia listener.

Note that all this need not apply for older browsers, not even the values of window.orientation! (See SO, SO, SO, Giff’s note)

So here now is my JavaScript code for screen orientation change detection:

function doOnOrientationChange(src)
{
  if (window.console && console.log) 
    console.log("width " + $(window).width() + " height " + $(window).height());

  var orientation = { 
    angle: window.orientation,
    type: ("onorientationchange" in window) ? "mobile" : "desktop"  
  };

  if (window.screen) {
    var o = window.screen.orientation || window.screen.mozOrientation 
      || window.screen.msOrientation || orientation;
    orientation = { angle: o.angle, type: o.type };
  } else if ((window.orientation === 0) || window.orientation) {
    orientation = { angle: window.orientation, type: "" + window.orientation + " degrees" };
  }
 
  if (!("onorientationchange" in window)) {
    var w = $(window).width(), h =$(window).height();
    var a = (w > h) ? 90 : 0;
    orientation.angle = a;
    if (window.console && console.log) 
      console.log("angle := " + a + " " + orientation.angle);
  }
 
  var jsonOrientation = JSON.stringify(
    { angle: orientation.angle, type: orientation.type });

  switch(orientation.angle) 
  { 
    case -90:
    case 90:
      // we are in landscape mode
      $().toastmessage('showNoticeToast', src + ' landscape ' + " " + jsonOrientation);
      if (window.console && window.console.log) console.log(src + ' landscape ' + " " + jsonOrientation);
      $("#orientation").text(src + ' landscape ' + " " + jsonOrientation);
      break; 
    case 0:
    case 180:
      // we are in portrait mode
      $().toastmessage('showNoticeToast', src + ' portrait ' + " " + jsonOrientation);
      if (window.console && window.console.log) console.log(src + ' portrait ' + " " + jsonOrientation);
      $("#orientation").text(src + ' portrait ' + " " + jsonOrientation);
      break; 
    default:
      // we have no idea
      $().toastmessage('showNoticeToast', src + ' unknown ' + " " + jsonOrientation);
      if (window.console && window.console.log) console.log(src + ' unknown ' + " " + jsonOrientation);
      $("#orientation").text(src + ' unknown ' + " " + jsonOrientation);
      break; 
  }
}

$(function () {

  if ("onorientationchange" in window) 
    window.addEventListener('orientationchange', 
      function() { doOnOrientationChange("window.orientationchange"); });
  //window.addEventListener('resize', 
  //    function() { doOnOrientationChange("window.resize") });
  if (window.screen && window.screen.orientation && window.screen.orientation.addEventListener)
    window.screen.orientation.addEventListener('change', 
      function() { doOnOrientationChange("screen.orientation.change"); });

  if (window.matchMedia) {
    var mql = window.matchMedia("(orientation: portrait)");
    mql.addListener(function(m) {
      if (m.matches) {
        doOnOrientationChange("mql-portrait");
      } else {
        doOnOrientationChange("mql-landscape");
      }
    });
  }

  doOnOrientationChange("init");
});

(I put the window.resize handler into comments because it generates too may events on desktop browsers.)

In this sample code, detection change only causes output of angle and orientation type to

  • $().toastmessage() – a jQuery extension
  • console.log
  • $(“#orientation”).text() – a jQuery call

Of course, your handlers may perform some useful actions…


Compiled Spam

March 12, 2015

We encountered the unprocessed spam template nearly 2 years ago.

And now there’s the compiled processed spam comment, which seems to include every spam comment ever posted in just 1 comment. Hooray!

I’m excited to uncover this great site. I want to to thank you
for your time due to this wonderful read!! I definitely appreciated every little bit of it and i also have you saved as a favorite to look at
new stuff in your site.

May I simply say what a comfort to find somebody that genuinely
knows what they’re discussing on the web.
You certainly know how to bring a problem to light and make it important.
More and more people really need to check this out and understand this side of the story.
I was surprised that you’re not more popular since
you most certainly possess the gift.

Excellent post. I absolutely appreciate this site.
Continue the good work!

It’s hard to find knowledgeable people on this topic, however, you seem like you know what you’re talking
about! Thanks

You should take part in a contest for one of the best sites on the internet.
I will highly recommend this blog!

An intriguing discussion is worth comment. There’s no doubt that that you should write more
about this issue, it might not be a taboo matter but generally people do
not discuss these subjects. To the next! Cheers!!

Hello there! I just want to offer you a huge thumbs up for your excellent
information you’ve got here on this post. I will be coming back to your web site for more soon.

After I initially left a comment I seem to have
clicked on the -Notify me when new comments are added- checkbox and now
whenever a comment is added I get four emails with the exact same
comment. Is there an easy method you are able
to remove me from that service? Cheers!

Next time I read a blog, Hopefully it does not disappoint me as much as
this one. After all, Yes, it was my choice to read, nonetheless I genuinely thought you’d have
something helpful to say. All I hear is a bunch of moaning about something you could fix if you weren’t too busy seeking
attention.

Spot on with this write-up, I absolutely believe this
website needs a lot more attention. I’ll probably be back again to see more, thanks for the
information!

You’re so awesome! I do not think I’ve read through
something like that before. So good to discover somebody with some
unique thoughts on this subject. Seriously.. thanks for starting this up.
This website is one thing that is needed on the internet, someone with a little originality!

I love reading through an article that can make men and women think.

Also, many thanks for permitting me to comment!

This is the perfect blog for everyone who wishes to
understand this topic. You realize so much its almost tough to argue with you (not that I actually would want to…HaHa).

You certainly put a new spin on a subject that’s been discussed for ages.
Wonderful stuff, just great!

Aw, this was an exceptionally good post. Taking a few minutes and actual effort to create a great article… but what can I say… I put things off a whole
lot and never seem to get nearly anything done.

I’m impressed, I must say. Seldom do I encounter a blog
that’s both educative and entertaining, and without a
doubt, you’ve hit the nail on the head. The problem is something that too few folks are
speaking intelligently about. Now i’m very happy I came across this in my
search for something regarding this.

Oh my goodness! Amazing article dude! Thanks, However I am experiencing issues with your RSS.

I don’t understand why I cannot join it. Is there anyone else
having similar RSS problems? Anyone that knows the answer can you
kindly respond? Thanx!!

An outstanding share! I’ve just forwarded this onto a friend who was conducting
a little research on this. And he actually ordered me lunch
simply because I discovered it for him… lol. So let me reword this….

Thank YOU for the meal!! But yeah, thanx for spending time to talk about this matter here on your website.

After looking into a handful of the articles on your web site,
I honestly like your technique of blogging. I saved
as a favorite it to my bookmark website list and will be checking back in the
near future. Take a look at my web site too and tell me what you think.

This site truly has all of the info I wanted concerning this subject and didn’t know who to ask.

There’s certainly a lot to know about this subject.

I really like all of the points you made.

You have made some good points there. I looked on the web for additional information about the issue and found most people
will go along with your views on this website.

Nice post. I learn something totally new and challenging on blogs I stumbleupon on a daily basis.
It will always be helpful to read through articles from other writers and practice something from other websites.

I blog often and I genuinely appreciate your content. This article has really peaked my interest.
I’m going to book mark your blog and keep checking for new details about once a week.
I opted in for your Feed as well.

Pretty! This has been an incredibly wonderful post.
Thanks for supplying these details.

Greetings! Very useful advice in this particular post!

It’s the little changes which will make the biggest changes.
Many thanks for sharing!

Howdy! This blog post could not be written any better!

Looking through this article reminds me of my previous roommate!
He always kept talking about this. I will send this information to him.

Fairly certain he will have a great read. Thanks for sharing!

Howdy, I think your site could be having web
browser compatibility issues. Whenever I look at your web site in Safari,
it looks fine however, when opening in Internet Explorer, it has some overlapping issues.
I merely wanted to give you a quick heads up! Apart from that, wonderful website!

Having read this I thought it was really informative.
I appreciate you taking the time and effort to put this content together.
I once again find myself personally spending a significant amount of time both reading and commenting.

But so what, it was still worth it!

Hi there! I could have sworn I’ve visited this site before but after browsing through many of the posts I realized it’s new to me.
Anyhow, I’m definitely happy I stumbled upon it and I’ll be bookmarking it and checking
back regularly!

I want to to thank you for this very good read!! I certainly
loved every little bit of it. I’ve got you book-marked to look at
new stuff you post…

Hi, I do believe this is an excellent site. I stumbledupon it 😉 I am going to return yet again since i have book-marked it.
Money and freedom is the greatest way to change, may you be rich and continue to help others.

Your style is unique compared to other people I’ve read stuff from.
Many thanks for posting when you’ve got the opportunity,
Guess I will just book mark this web site.

I used to be able to find good advice from your blog posts.

Very good post! We will be linking to this great post on our website.

Keep up the good writing.

That is a very good tip particularly to those fresh to the blogosphere.
Simple but very accurate info… Many thanks for sharing
this one. A must read article!

I could not refrain from commenting. Perfectly written!

bookmarked!!, I really like your website!

Very good article. I am experiencing a few of these issues as well..

Way cool! Some very valid points! I appreciate you writing this write-up plus
the rest of the website is very good.

Great web site you have got here.. It’s hard to find
good quality writing like yours these days. I really appreciate people
like you! Take care!!

This is a topic that’s near to my heart…
Cheers! Exactly where are your contact details though?

I truly love your website.. Pleasant colors & theme.
Did you create this site yourself? Please reply back as I’m
attempting to create my own personal site and want to know where you
got this from or just what the theme is named.

Appreciate it!

I really like it when people get together and share thoughts.
Great website, stick with it!

Very good info. Lucky me I recently found your blog by chance (stumbleupon).
I’ve book-marked it for later!

This blog was… how do you say it? Relevant!!
Finally I’ve found something that helped me. Appreciate it!

Everything is very open with a clear clarification of the
challenges. It was really informative. Your site is
very useful. Many thanks for sharing!

I would like to thank you for the efforts you’ve put in penning this blog.
I am hoping to see the same high-grade content from you in the
future as well. In fact, your creative writing abilities has
motivated me to get my own, personal site now


Spam Bot Crawlers?

February 7, 2014

Spam alert again!

1) The famous unprocessed spam template finally reached my spam queue. At last!

2) some sort of blog crawler seems to crawl this blog and collect the URLs, such that some Russian film lovers get the opportunity to advertise

Лучшие фильмы!

Смотрите популярные фильмы

from various IP ranges.

Getting tired…


Googlebot POSTS – using jQuery

January 22, 2014

After I came up with the idea to log web application hits using jQuery, to my great surprise I found that Googlebot actually performs POSTs implemented as jQuery $.ajax() calls:

2014-01-15 09:46:04 POST /Log - - 66.249.64.45 
  Mozilla/5.0+(compatible;+Googlebot/2.1;++http://www.google.com/bot.html) - 200 0 0 255

Wow!

Searching the Interwebs I found other people who observed this behavior, too:

Most importantly, the links in Wikipedia’s Googlebot article analyze the bot’s behavior in more detail:

The articles are about 2 years old, so the bot may now be even more capable than then.

Of course, the simplest solution to prevent bots from POSTing is to add the logger’s URL to robots.txt:

User-agent: *
Disallow: /Log

 


Follower Spam?

August 2, 2013

The internet gets stranger and stranger. After referrer spam, which I understand would only target blog admins, the latest trend is follower spam. Really?

celestineptixf@hotmail.com is now following devioblog

learzrzerv@hotmail.com is now following devioblog

kassandravrmxe@hotmail.com is now following devioblog

merilynvawwt@hotmail.com is now following devioblog

amparobbhae@hotmail.com is now following devioblog

annabellulxqy@hotmail.com is now following devioblog

caridljyq@hotmail.com is now following devioblog

vaniapuuqc@hotmail.com is now following devioblog

paigekllln@hotmail.com is now following devioblog

nevadaoisbg@hotmail.com is now following devioblog

valraoij@hotmail.com is now following devioblog

fletamzrlv@hotmail.com is now following devioblog

bobbiemcgfq@hotmail.com is now following devioblog

jamikazkzpi@hotmail.com is now following devioblog

jadaialfl@hotmail.com is now following devioblog

renegltwwcf@hotmail.com is now following devioblog

dedetdait@hotmail.com is now following devioblog

delorasmmdcj@hotmail.com is now following devioblog

celestineptixf@hotmail.com is now following devioblog

Wow, I really became popular only within a couple of hours! 😉


If you have a template, someone needs to process it, too

April 29, 2013

Just came along this post by Scott Hanselman, and I feel the need to share it, so that the template bots have the opportunity for commenting on their template 😉

(My guess is that the template engine does not support nested templates, but who knows?)

{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours 
today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, 
if all {webmasters|site owners|website owners|web owners} and bloggers 
made good content as you did, the {internet|net|web} will be 
{much more|a lot more} useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. 
{Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your 
{email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} 
service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} 
{so that|in order that} I {may just|may|could} subscribe.
Thanks.|
{It is|It's} {appropriate|perfect|the best} time to make some plans for 
the future and {it is|it's} time to be happy.
{I have|I've} read this post and if I could I {want to|wish to|desire to} suggest 
you {few|some} interesting things or {advice|suggestions|tips}. {Perhaps|Maybe} 
you {could|can} write next articles referring to this article. I {want to|wish to|desire to} 
read {more|even more} things about it!|
{It is|It's} {appropriate|perfect|the best} time to make {a few|some} plans for 
{the future|the longer term|the long run} and {it is|it's} time to be happy. 
{I have|I've} {read|learn} this {post|submit|publish|put up} and
if I {may just|may|could} I {want to|wish to|desire to} {suggest|recommend|counsel} 
you {few|some} {interesting|fascinating|attention-grabbing} {things|issues} or 
{advice|suggestions|tips}.
{Perhaps|Maybe} you {could|can} write {next|subsequent} articles {relating to|referring to|regarding} 
this article.
I {want to|wish to|desire to} {read|learn} {more|even more} {things|issues} 
{approximately|about} it!|{I have|I've} been {surfing|browsing} {online|on-line} 
{more than|greater than} {three|3} hours {these days|nowadays|today|lately|as of late}, 
{yet|but} I {never|by no means} {found|discovered} any {interesting|fascinating|attention-grabbing} 
article like yours. {It's|It is} {lovely|pretty|beautiful} {worth|value|price} 
{enough|sufficient} for me. {In my opinion|Personally|In my view},
if all {webmasters|site owners|website owners|web owners} and bloggers made 
{just right|good|excellent} {content|content material} as {you did|you probably did}, 
the {internet|net|web} {will be|shall be|might be|will probably be|can be|will likely be} 
{much more|a lot more} {useful|helpful} than ever before.| 
Ahaa, its {nice|pleasant|good|fastidious} {discussion|conversation|dialogue} 
{regarding|concerning|about|on the topic of} this {article|post|piece of writing|paragraph} 
{here|at this place} at this {blog|weblog|webpage|website|web site}, I have read all
that, so {now|at this time} me also commenting {here|at this place}.|
I am sure this {article|post|piece of writing|paragraph}
has touched all the internet {users|people|viewers|visitors}, its really really 
{nice|pleasant|good|fastidious} {article|post|piece of writing|paragraph} on
building up new {blog|weblog|webpage|website|web site}.
|
Wow, this {article|post|piece of writing|paragraph} is {nice|pleasant|good|fastidious}, my
{sister|younger sister} is analyzing {such|these|these kinds of} things, 
{so|thus|therefore} I am going to {tell|inform|let know|convey} her.|
{Saved as a favorite|bookmarked!!}, {I really like|I
like|I love} {your blog|your site|your web site|your website}!
|
Way cool! Some {very|extremely} valid points! I
appreciate you {writing this|penning this} {article|post|write-up} 
{and the|and also the|plus the} rest of the {site is|website is} 
{also very|extremely|very|also really|really} good.
|
Hi, {I do believe|I do think} {this is an excellent|this is a great} 
{blog|website|web site|site}. I stumbledupon it ;) {I will|I am going
to|I'm going to|I may} {come back|return|revisit} {once again|yet again} 
{since I|since i have} {bookmarked|book marked|book-marked|saved as a favorite} 
it. Money and freedom {is the best|is the greatest} way to change, may you be 
rich and continue to {help|guide} {other people|others}.|
Woah! I'm really {loving|enjoying|digging} the template/theme of this 
{site|website|blog}.
It's simple, yet effective. A lot of times it's {very hard|very difficult|challenging|tough|difficult|hard} 
to get that "perfect balance" between {superb usability|user friendliness|usability} 
and {visual appearance|visual appeal|appearance}.
I must say {that you've|you have|you've} done a {awesome|amazing|very good|superb|fantastic|excellent|great} 
job with this. {In addition|Additionally|Also}, the blog loads {very|extremely|super} 
{fast|quick} for me on {Safari|Internet explorer|Chrome|Opera|Firefox}.
{Superb|Exceptional|Outstanding|Excellent} Blog!
|
These are {really|actually|in fact|truly|genuinely} {great|enormous|impressive|wonderful|fantastic} ideas
in {regarding|concerning|about|on the topic of} blogging.
You have touched some {nice|pleasant|good|fastidious} {points|factors|things}
here. Any way keep up wrinting.|
{I love|I really like|I enjoy|I like|Everyone loves} what you guys
{are|are usually|tend to be} up too. {This sort
of|This type of|Such|This kind of} clever work and {exposure|coverage|reporting}!

Keep up the {superb|terrific|very good|great|good|awesome|fantastic|excellent|amazing|wonderful} 
works guys I've {incorporated||added|included} you guys to {|my|our||my personal|my own} 
blogroll.|
{Howdy|Hi there|Hey there|Hi|Hello|Hey}! Someone in my {Myspace|Facebook} group shared 
this {site|website} with us so I came to {give it a look|look it over|take a look|check it out}. 
I'm definitely {enjoying|loving} the information.
I'm {book-marking|bookmarking} and will be tweeting this to my followers! 
{Terrific|Wonderful|Great|Fantastic|Outstanding|Exceptional|Superb|Excellent} blog and 
{wonderful|terrific|brilliant|amazing|great|excellent|fantastic|outstanding|superb} 
{style and design|design and style|design}.|
{I love|I really like|I enjoy|I like|Everyone loves} what you guys {are|are usually|tend to be} 
up too. {This sort of|This type of|Such|This kind of} clever work and {exposure|coverage|reporting}! 
Keep up the {superb|terrific|very good|great|good|awesome|fantastic|excellent|amazing|wonderful} 
works guys I've {incorporated|added|included} you guys to
{|my|our|my personal|my own} blogroll.|
{Howdy|Hi there|Hey there|Hi|Hello|Hey} would you mind {stating|sharing} which blog 
platform you're {working with|using}? I'm {looking|planning|going} to start my own blog 
{in the near future|soon} but I'm having a {tough|difficult|hard} time 
{making a decision|selecting|choosing|deciding} between BlogEngine/Wordpress/B2evolution and Drupal. 
The reason I ask is because your {design and style|design|layout} seems different then 
most blogs and I'm looking for something {completely unique|unique}. P.S 
{My apologies|Apologies|Sorry} for {getting|being} off-topic but
I had to ask!|
{Howdy|Hi there|Hi|Hey there|Hello|Hey} would you mind letting
me know which {webhost|hosting company|web host} you're {utilizing|working with|using}? 
I've loaded your blog in 3 {completely different|different} {internet browsers|web browsers|browsers} 
and I must say this blog loads a lot {quicker|faster} then most.

Can you {suggest|recommend} a good {internet
hosting|web hosting|hosting} provider at a {honest|reasonable|fair}
price? {Thanks a lot|Kudos|Cheers|Thank you|Many thanks|Thanks}, I
appreciate it!|
{I love|I really like|I like|Everyone loves} it {when people|when individuals|when folks|whenever people} 
{come together|get together} and share {opinions|thoughts|views|ideas}. 
Great {blog|website|site}, {keep it up|continue the good work|stick with it}!|
Thank you for the {auspicious|good} writeup. It in fact was a amusement account it.
Look advanced to {far|more} added agreeable from you! {By the way|However}, how 
{can|could} we communicate?
|
{Howdy|Hi there|Hey there|Hello|Hey} just wanted to give you a quick heads up.

The {text|words} in your {content|post|article} seem to be running off
the screen in {Ie|Internet explorer|Chrome|Firefox|Safari|Opera}.
I'm not sure if this is a {format|formatting} issue or something to do with 
{web browser|internet browser|browser} compatibility but I {thought|figured} I'd
post to let you know. The {style and design|design
and style|layout|design} look great though! Hope you get the {problem|issue} 
{solved|resolved|fixed} soon.

{Kudos|Cheers|Many thanks|Thanks}|
This is a topic {that is|that's|which is} {close to|near to} my heart... 
{Cheers|Many thanks|Best wishes|Take care|Thank you}! {Where|Exactly where} are 
your contact details though?|
It's very {easy|simple|trouble-free|straightforward|effortless}
to find out any {topic|matter} on {net|web} as compared to {books|textbooks}, as 
I found this {article|post|piece of writing|paragraph} at this {website|web site|site|web page}.|
Does your {site|website|blog} have a contact page?
I'm having {a tough time|problems|trouble} locating it but, I'd
like to {send|shoot} you an {e-mail|email}. I've got some {creative ideas|recommendations|suggestions|ideas} 
for your blog you might be interested in hearing. Either way, great {site|website|blog} 
and I look forward to seeing it {develop|improve|expand|grow} over time.|
{Hola|Hey there|Hi|Hello|Greetings}! I've been {following|reading} your {site|web site|website|weblog|blog} 
for {a long time|a while|some time} now and finally got the {bravery|courage} to go ahead 
and give you a shout out from {New Caney|Kingwood|Huffman|Porter|Houston|Dallas|Austin|Lubbock|Humble|Atascocita} {Tx|Texas}!
Just wanted to {tell you|mention|say} keep up the {fantastic|excellent|great|good}
{job|work}!|
Greetings from {Idaho|Carolina|Ohio|Colorado|Florida|Los angeles|California}!

I'm {bored to tears|bored to death|bored} at work so I decided to {check out|browse} 
your {site|website|blog} on my iphone during lunch break. I {enjoy|really like|love} 
the {knowledge|info|information} you {present|provide} here and can't wait to
take a look when I get home. I'm {shocked|amazed|surprised} at how {quick|fast} 
your blog loaded on my {mobile|cell phone|phone} .. I'm not even using WIFI, just 3G .. 
{Anyhow|Anyways}, {awesome|amazing|very good|superb|good|wonderful|fantastic|excellent|great} 
{site|blog}!
|
Its {like you|such as you} {read|learn} my {mind|thoughts}!
You {seem|appear} {to understand|to know|to grasp} {so much|a lot} {approximately|about} 
this, {like you|such as you} wrote the {book|e-book|guide|ebook|e book} in it 
or something. {I think|I feel|I believe} {that you|that you simply|that you just} 
{could|can} do with {some|a few} {%|p.c.|percent} to {force|pressure|drive|power} 
the message {house|home} {a bit|a little bit}, {however|but} {other than|instead of} 
that, {this is|that is} {great|wonderful|fantastic|magnificent|excellent} blog. 
{A great|An excellent|A fantastic} read. {I'll|I will} {definitely|certainly} be back.|
I visited {multiple|many|several|various} {websites|sites|web sites|web pages|blogs} 
{but|except|however} the audio {quality|feature} for audio songs {current|present|existing} 
at this {website|web site|site|web page} is {really|actually|in fact|truly|genuinely} 
{marvelous|wonderful|excellent|fabulous|superb}.|
{Howdy|Hi there|Hi|Hello}, i read your blog {occasionally|from time to time} and 
i own a similar one and i was just {wondering|curious} if you get a lot of spam 
{comments|responses|feedback|remarks}? If so how do you {prevent|reduce|stop|protect against} 
it, any plugin or anything you can {advise|suggest|recommend}? I get so much 
lately it's driving me {mad|insane|crazy} so any {assistance|help|support} is very 
much appreciated.|
Greetings! {Very helpful|Very useful} advice {within this|in this particular} 
{article|post}! {It is the|It's the} little changes {that make|which will make|that produce|that will make} 
{the biggest|the largest|the greatest|the most important|the most significant} changes. 
{Thanks a lot|Thanks|Many thanks} for sharing!|
{I really|I truly|I seriously|I absolutely} love {your blog|your site|your website}.. 
{Very nice|Excellent|Pleasant|Great} colors & theme. Did you {create|develop|make|build} 
{this website|this site|this web site|this amazing site} yourself? Please reply back 
as I'm {looking to|trying to|planning to|wanting to|hoping to|attempting to} create 
{my own|my very own|my own personal} {blog|website|site} and {would like to|want to|would love to} 
{know|learn|find out} where you got this from or {what the|exactly what the|just what the} 
theme {is called|is named}. {Thanks|Many thanks|Thank you|Cheers|Appreciate it|Kudos}!|
{Hi there|Hello there|Howdy}! This {post|article|blog post} {couldn't|could not} 
be written {any better|much better}! {Reading through|Looking at|Going through|Looking through} 
this {post|article} reminds me of my previous roommate! He {always|constantly|continually} 
kept {talking about|preaching about} this. {I will|I'll|I am going to|I most certainly will} 
{forward|send} {this article|this information|this post} to him. {Pretty sure|Fairly certain} 
{he will|he'll|he's going to} {have a good|have a very good|have a great} read. 
{Thank you for|Thanks for|Many thanks for|I appreciate you for} sharing!|
{Wow|Whoa|Incredible|Amazing}! This blog looks {exactly|just} like my old one! It's on a 
{completely|entirely|totally} different {topic|subject} but it has pretty much the same 
{layout|page layout} and design. {Excellent|Wonderful|Great|Outstanding|Superb} 
choice of colors!|
{There is|There's} {definately|certainly} {a lot to|a great deal to} {know about|learn about|find out about} 
this {subject|topic|issue}. {I like|I love|I really like} {all the|all of the} points 
{you made|you've made|you have made}.|
{You made|You've made|You have made} some {decent|good|really good} points there. 
I {looked|checked} {on the internet|on the web|on the net} {for more info|for more information|to find out more|to learn more|for additional information} 
about the issue and found {most individuals|most people} will go along with your views 
on {this website|this site|this web site}.|
{Hi|Hello|Hi there|What's up}, I {log on to|check|read} your {new stuff|blogs|blog} 
{regularly|like every week|daily|on a regular basis}. Your {story-telling|writing|humoristic} 
style is {awesome|witty}, keep {doing what you're doing|up the good work|it up}!|
I {simply|just} {could not|couldn't} {leave|depart|go away} your {site|web site|website} 
{prior to|before} suggesting that I {really|extremely|actually} {enjoyed|loved} 
{the standard|the usual} {information|info} {a person|an individual} {supply|provide} 
{for your|on your|in your|to your} {visitors|guests}? Is {going to|gonna} be {back|again} 
{frequently|regularly|incessantly|steadily|ceaselessly|often|continuously} {in order to|to} 
{check up on|check out|inspect|investigate cross-check} new posts|
{I wanted|I needed|I want to|I need to} to thank you for this {great|excellent|fantastic|wonderful|good|very good} 
read!! I {definitely|certainly|absolutely} {enjoyed|loved} every {little bit of|bit of} it. 
{I have|I've got|I have got} you {bookmarked|book marked|book-marked|saved as a favorite} 
{to check out|to look at} new {stuff you|things you} post

From Russia with DDOS

February 3, 2013

Last week one of my WordPress installations got hit by a distributed admin password attack.

Over the course of ~24 hours, about 1.800 attempts to log in as administrator have been made, originating from over 500 IP addresses world-wide.

The requests always had the same sequence:

GET /administrator
GET /administrator/
POST /administrator/index.php

The requests continued until I finally “hid” (i.e. renamed) the login script and replaced it with an empty file without input controls. About 15 minutes the requests stopped.



The requests mainly originated from Asia, especially Russia and neighboring states: