• Bad Bot go away!

    Sigh. Here I am at work on Tuesday morning. List of jobs to do being interrupted by our web server triggering over load alarms. Actually, it’s been doing it for quite a while, but I’ve never sat down to analyse the logs to find what’s happening to trigger the alarm (our gandi.net virtual server is more than powerful enough to cope, so fault finding has been low on my to do list). This morning as I walked to work I saw an overload message arrive in my email. The sun is up, the sky is blue, it’s 8am. It feels a good day to fault find…

    It didn’t take long to find the problem. I used grep to pull out todays log entries from the apache log and put them into a temporary file

    me@server4:/path_to_logs/rkbb.co.uk$ grep ’06/Apr/2010′ apache-log > check.txt

    The bot causing the problem has a user agent of “Mozilla/5.0 (compatible; Purebot/1.1; +http://www.puritysearch.net/)”, going to puritysearch.net I find a ‘search engine’ that doesn’t appear to do anything but display adverts disguised as search results.

    So, how to stop this bot. Nice bots read a file called robots.txt which tells them where they’re allowed to go. Purebot didn’t read the robots.txt so I couldn’t excluded it there.

    My next thought was to use apache to exclude the user agent. After an hour or so of trying I gave up with that (it is possible, I just didn’t figure it out and took the easy for me approach). The site is running Coldfusion (actually BlueDragon) so in the Application.cfm I can check the user agent and stop processing requests from Purebot there.

    <cfset useragenttest = find(“Purebot”,#cgi.http_user_agent#)>

    <cfif useragenttest GT 0 >
      <p>Purebot banned</p>
      <cfabort>
    </cfif>

    The code isn’t my most elegant but it works. Next time I come across a badbot (or Purebot changes it’s name) I’ll just updated this piece of code to ignore their requests.


  • blogging without using a keyboard (using windows built in speech recognition)

    307-speechrecognitionmicrophone.pngI’ve been looking at buying dragon naturally speaking from an IT supplier for typing on to the computer. It is software I heard of many years ago that converts speech into type as you speak. I had an mail offering it for only 30.00 which is less than I remember. However I like to test things before I buy them especially when it comes to software. I searched the Internet but couldn’t find a trial version to download. Just as I was about to give up I discovered a webpage that mentioned windows built in speech recognition.

    So I’m sitting at home to blog for the first time ever without typing a word. I’ve been through the tutorial and so far I’m finding it very accurate. In the first paragraph I Can Count Three mistakes, I’m sure that as I continue to use it accuracy will improve over time.

    It isn’t quite plain sailing, I’m having a little trouble remembering all the commands but that’s no different to when I first learned to use a computer. (quick note, I was brought up with a local dialect where I use the word learnt, but the computer heard learned. I’m sure there’s a blog Post about observations of my local dialect somewhere here). One thing I am glad of is that my headset microphone has a microphone mute button. The software does it by saying stop listening to stop listening, but sometimes while I’ve been thinking of what to say and start speaking it thinks it misheard my silence as a word and asks me to repeat.

    As a beginner with speech recognition the other problem I’ve been having is getting the cursor mixed up with an action. For example, a moment ago I managed to select a whole section of text inadvertently and then change the format by telling the computer to use a button on the webpage.

    I think I’m a long way off using this is a regular way of inputting text. I just tested my typing speed on the website and got a result of 72 words per minute. I think my current speaking speed is actually slower than 72 words per minute as I’m waiting for the computer to display each sentence as I’ve spoken. Those of my friends who have seen one of my presentations may know that one of my biggest floors (and there are many I know) is speaking too fast. Maybe I should record all of my presentation through speech recognition as a way of slowing myself down!

    Now to see if I can publish this blog post without touching the keyboard …


  • Memories of Nan Root

    Taking Nicola to swimming club tonight we were talking about memories of her Nan and that reminded me of my Nan. Two things immediately sprung to mind, the first was going to Nan’s for lunch.

    She’d always lay on a huge spread of food, filling a table that to a 6 year old as as big as I was (so, I imagine, about 1.5m diameter?). It had fresh bloomer bread thick cut and spread with real butter (at home we had margarine so it was always a treat). New potatoes that always tasted unique (I later discovered, it was the salt. Nan always added lots of salt whereas mum didn’t, which is why it always tasted so different at Nan’s). Fine bone china bowls with pastel colour flower patterns spring to mind, though not in any detail. Runner beans and peas, fresh from Granddad’s flower bed. Happy days of childhood.

    305-marsmilkbottle (Custom).jpgI then remembered the ‘Mars Milk’. I guess I was staying at Nan and Granddad’s for a weekend. We’d gone shopping and I asked if we could buy the ‘Mars Milk’. I didn’t understand what Nan was trying to tell me at the time, that the Mars chocolate bar was an advert for Mars and the milk was normal milk. I liked it enough to ask for it again though. Several years later, and Mars flavoured milk appeared on the supermarket shelves.

    I don’t claim that any of the above is of interest to anyone but me, but the memories are wonderfully tasty in my mind.


Search this site


Free apps

  • birthday.sroot.eu – Your birthday or other celebration date based on [years on other planets] / [how many seconds/days] / [how far you’ve travelled around the sun]
  • stampulator.sroot.eu – Calculates the combination and how many 1st, 2nd, large 1st and large 2nd class Royal Mail stamps you need on large envelopes and packets

Recent posts


Archives


Categories