May 4th, 2010 admin
Just to remind myself as much as anything, as I’ve been through this a few times. ClamAV was complaining loudly in the logfiles about not having the most up to date ClamAV. I searched around and was pointed to the Debian Unstable repository to /etc/apt/sources.list (Read the whole article before you add this one …there is a better one)
After that, on running apt-get update, you get a message like this:
W: GPG error: http://volatile.debian.org etch/volatile Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY DFD993306D849617
So, take the pubkey number off the end and do this with it.
sudo gpg --keyserver subkeys.pgp.net --recv-keys DFD993306D849617
sudo gpg --armor --export DFD993306D849617 > new.key
sudo apt-key add new.key
I then got a message saying “The following packages have been kept back: clamav clamav-daemon clamav-freshclam”
By using
sudo aptitude dist-upgrade
(NB aptitude rather than apt-get) the new packages are downloaded. However they’re still not up to the level that ClamAV is telling me to upgrade to.
So, more searching. It turns out the most up to date Ubuntu Repositories are from this page … https://launchpad.net/~ubuntu-clamav/+archive/ppa. In my case the solution was to add these lines to my /etc/apt/sources.list
deb http://ppa.launchpad.net/ubuntu-clamav/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/ubuntu-clamav/ppa/ubuntu hardy main
And then run through the pubkey process above, with the different pubkey id number. Later distros might get away with the add-apt-key command, but I was running hardy (8.04) on this particular server.
Posted in General IT, Linux, Security | No Comments »
April 7th, 2010 admin
Another fantastic illustration of how Linux ‘gets the job’ done. Although sometimes the operator (ahem) is sometimes a bit slow on the uptake.
Anyway, I had a Linksys WRT54G router in which the wireless unit had blown up after a power outage and surge. Gotta love the Philippines. I had dd-wrt on it, but decided to try out OpenWRT. Well lets just say that OpenWRT isn’t to my taste. I wanted something which worked more or less immediately, rather than poring over documentation trying to figure out how to get the WAN interface up via a command line.
So I dropped the router into a drawer until today, when I needed to use it for something (without the need for wireless). Well of course when I needed it, it wouldn’t boot. In fact I couldn’t even ping it. This is bad news.
I tracked down an internet post which mentioned that if I held the reset button while booting, the router would go into admin mode, which meant I could ping it. I did this and it worked. I read elsewhere that in order to flash it with tftp, I needed to do so when the ping response time was 100ms, before it dropped to 64ms. Exciting stuff. I set up the tftp flashing machine and tried, possibly 50 or 60 times, to flash back ddwrt. No luck. For reference, here is the one liner:
echo -e "binary\nrexmt 1\ntimeout 60\ntrace\nput ddwrt.bin\n" | tftp 192.168.1.1
I did an nmap scan of the router and found that port 23 was open, so I managed to telnet into it. I couldn’t connect the wan interface (as previously noted), but I had a command prompt. No SSH, no web interface. So how to get the ddwrt.bin file onto the router via telnet?
Here’s how: On my PC, at 192.168.1.50, I went to the directory which held the ddwrt.bin file. At the command prompt I typed
python -m SimpleHTTPServer
This serves up the current directory over HTTP, port 8080.
In my router telnet session I went to the /tmp directory (the only place with enough space for the file) and typed
wget http://192.168.1.50:8080/ddwrt.bin
After a few seconds, the file was there! Alright!
Still in the router, I did
mtd -r write dd-wrt.bin linux
The router whirred for a while, rebooted and … ddwrt was back, in all its web-interfacy autoconfigurating glory.
What a great trick with SimpleHTTPServer. Shame I wasted hours on the tftp approach. Incidentally, there’s a similar tool which will let people upload files to your computer via HTTP, called droopy.
Posted in General IT, Linux | No Comments »
March 16th, 2010 admin
Every now and then I come across something which makes me marvel at the flexibility of Linux. This is one of these things.
I play guitar, and I’d previously written a small script to act as a guitar tuner. I generated some .ogg files of the correct pitch and then wrote a script to loop through them in sequence. “Pretty good”, I thought, “Clever Me.”
Then a few days ago I came across this little gem of a script.
for n in E2 A2 D3 G3 B3 E4;do play -n synth 4 pluck $n repeat 2;done
That’s it. Sheer brilliance. Of course you’ll need to install the sox package first.
Posted in General IT, Linux | No Comments »
November 18th, 2009 admin

Captcha If You Can
I understand what captchas are for, and why we need them, but they seem to be getting out of control. I recently visited a site which had the captcha displayed here.
For the record the first word wasn’t ‘stirred’. I saw the option for an audio captcha and wondered how you pronounce ‘Ohehyahtah’. If that indeed was the second word. Too good to miss. I pressed the button and found that the audio captcha is just as bizzarrely impenetrable as the text. The mp3 file of it is here, and it reminded me strongly of an early David Lynch film]. Back to the text: after refreshing the words two or three times I was eventually able to get to the next stage.
The next stage involved typing a random string of letters into a box – approximately 200 characters. The web page did kindly suggest that I could cut and paste them into the box, which I did, but really, what this did was turn a quick attempt to give someone some feedback on their blog into a task akin to hacking into NASA.
Security shouldn’t be that hard. It should be as unobtrusive as possible. Roll on the next anti-bot paradigm.
Posted in General IT, Life, Security | No Comments »
November 5th, 2009 admin
I’ve learnt my lesson on this a few times: things break when you upgrade Ubuntu on laptops. I can understand why. There is a huge variety of hardware for laptops, particularly BIOSes, sound chips and wireless chips, and every manufacturer likes to tweak them a bit. The Linux kernel has the unenviable task of having to support ALL of them immediately, whereas in Windows the hardware component manufacturer supplies drivers which you have to install to get your machine working correctly.
Anyway, for example, last time I upgraded my two laptops from 8.10 to 9.04, a lot of things broke, and I was hurting for a long time. In fact one of the laptops never really got straight. This was irritating for me, but as I had another laptop to use for my main work, it wasn’t a major annoyance. But I can imagine if you only have one machine and the sound doesn’t work on it, for example, it would leave a nasty taste in your mouth.
So this time, I started with the Thinkpad R51e, which is my spare laptop. I have the /home directory mounted on a separate partition, which makes things really easy. Basically you just blow away the main OS partition, and then remount the your data partition at /home, preserving all your data. (OK its a little more complicated than that, but I’m not blogging about that right now). Read the rest of this entry »
Posted in General IT | No Comments »
October 24th, 2009 admin
 Knot the way to do it
Now every so often I complain about my job. No, really. I do. But then something happens to make me realise how lucky I really am. And one of those moments happened just yesterday.
I’ll set the scene. Its just after two major typhoons have torn apart the Philippines. Its wet and rainy and the residual wind occasionally rattles the windows. I’m slogging away in front of my computer on a fairly mundane task, and having a bit of a hard time concentrating. I look out of the window. And I see some rope going past. Rope with a knot in it.
This particular ropeĀ doesn’t look very safe to me, but then again what do I know. I’m not a sailor, and this could be some kind of special frayed knot type thing which is actually very safe. Interested by now, I take a look out of the window.
Read the rest of this entry » |
Posted in Life, Philippines | No Comments »
October 3rd, 2009 admin
So I was working from home the other day, around mid-morning, when I heard a mighty crunch from outside. I looked out my window and was confronted with the scene to the left.
I snapped a picture, and watched as a crowd started to gather, and then after about 5 minutes, the driver emerged from the car, shaking his head. He made a great show of examining the lamppost and chatted happily with the assembled crowd.
Two things disturb me about this photo. The first is that I can’t figure out how he managed to crash. There was no traffic around. Traffic on that road only goes about 15km/h. The lamppost was clearly visible and easy to avoid. I can only conclude he lost control of the car, or suffered some kind of seizure.
The second thing is … the lampost is in the middle of the road! I’ve been looking at that for the past year and it never struck me as odd until now. I am clearly innured to this sort of general strangeness.
Anyway, the conclusion to this story is that a couple of hours later a policeman wandered by and took notes. Then a guy arrived with a tin of yellow paint and painted the base of the lamppost yellow. Apparently then, the guy just hadn’t seen it.
Posted in Life, Philippines | No Comments »
June 8th, 2009 admin
I’ve recently been using Dropbox. Its a free offsite backup service, which works with Windows, Linux and Mac and gives you 2Gb of space for free. You can pay for more if you need it. Here’s what I like about it:
- It just works. Drop your files into a folder and forget about it.
- You can join more than one computer to the same account and the files sync between both computers. eg one at work, one at home.
- If you’re away from you computer and you need a file, you can get it from the web interface. (But of course you’d only do this on computers you trust
- There are different levels of privacy. Private files are only seen by you. However you can share files with certain people, by supplying their email addresses. You also have Public files which can be downloaded by anyone at all with the given URL. Much more control than senduit.com for example.
- Photos put in the photo folder are instantly made into galleries. Neat.
- You can roll back to a previous version of a file if you make a mistake.
Having said all that, I wouldn’t trust super secret work or personal documents to it, but for keeping a backup of photos and non-sensitive personal docuements, it works a treat.
Also, there’s a referral program on at the moment, so if you sign up via the link below, you get an extra 250Mb of space. And so do I as well … go on … its free, and you’ll be glad you did.
https://www.getdropbox.com/referrals/NTI3NDkwMDk
Posted in General IT, Security | 2 Comments »
June 2nd, 2009 admin
Man this is the best kept secret in the entire telecoms industry … I’ve been trying to send email through PLDT’s SMTP servers as I’m a broadband customer of theirs, and my normal SMTP server wasn’t working. I needed to get an email out, and I was getting a little desperate.
So apparently the published SMTP servers don’t actually work. Yay! If you try looking on the PLDT website, where you might expect to see this kind of useful information … well just don’t bother. You get seasick pretty quickly from all the flash whoopiness, and the dead ends and 404 start to piss you off after a while. So then you do a few google searches and come up with a couple of published servers, which basically don’t work: smtp.info.com.ph and smtp.pldtdsl.net
So, eventually I cracked and went to the Customer Hotline. After re-phrasing my question several thousand times until I was understood, the answer was … smtpdsl4.pldtdsl.net , using port 587. Which actually works.
Port 587, yes of course, why didn’t I guess that one.
Posted in General IT, Philippines | 2 Comments »
May 4th, 2009 admin
Just came across this awesome tool which will let you format webpages in real time, and then output them to a printer.
Here’s the URL http://www.printwhatyoulike.com/
And here’s a link to this very page opened up in the site, so you can try it out.
Brilliant. Why didn’t I think of that …. Oh, and they’ve also got a ‘bookmarklet’ (great idea, terrible name) which you can drop onto your IE or Firefox toolbar which gives you quick access to the functionality of the site. Just click the button, and the page you’re currently browsing will open in the Printwhatyoulike website.
Posted in General IT | No Comments »