Root Canal Filling…its about as fun as the name sounds….

May 16, 2008

Earlier this week I managed to break my tooth doing the unthinkable thing….thats right… I was eating a chocolate digestive biscuit!!!

I had to book an appointment with a private dentist as I’m at University and my registered dentist is about 100 miles away. I feared I would need a crown as the tooth was badly broken in my opinion.. Well today was the day of reckoning.

The first thing he said was “Ah Thats not a bad break” which proved how little I know about these things. Then… “hmm theres some decay under there, better get that out.” which hurt a little but nothing I haven’t had before. Then came the “you’re going to need a root canal filling”. That was when trouble started. When it comes to medicinal things Im fairly easily paniced. The only things I have heard about root canals is that they are quite uncomfortable and not that pleasant to have done. So he began…

At first, the drilling out and cleaning the decay out was uncomfortable and there was a little bit of pain, but nothing I have not had before with a filling that needed a bit of cleaning work on the gum, then he told me that the nerves have to be extracted from the gum before it can be sealed. ok…

No pain, a real uncomfortable feeling that lead to nausea and me almost fainting when it was over. Add this to “we will see you in 3 weeks for the filling, Ive just put a temporary antibiotic one in” and you have the recipe for hell.
Don’t get me wrong it doesn’t hurt, but its an awful awful feeling =[

I headed straight to the shop to buy some milk to prevent this from happening to another tooth hehe.


HOWTO: Automatically Backup Your Linux system with rsync

May 15, 2008

So,

One of the things I was wondering about, and had never really done in linux, was backing up my files. Working as a Programmer and Web Developer, I have issues arising all of the time with bits of code that have gone missing as a result of accidents. I decided I needed a better backup system, and what better way than to make one which simply backs everything up without your input!

I decided that I would back my sourcecode files “/home/ajc/src” and my documents “/home/ajc/doc” every week. That way a loss could not be too catastrophic.

The tool which I chose to use was rsync. Many modern distributions come with this built in (I use ubuntu) and if they don’t this will certainly be in the repositories.

First things first. Set up the destination folder for your files:

#mkdir /media/vince/data_Backup in my case.

Once that is done you are ready to learn rsync.

The command which I use for my backups is as follows (it has a few extra options which I will explain)

#sudo rsync -av --progress --delete --log-file=/home/ajc/doc/$(date +%Y%m%d)_rsync.log /home/ajc/src /media/vince/data_Backup

As you can see this line of code deals with my source folder. The options are: “-a” for archive “v” means verbose so you will see detailed output “–progress” gives a progress update in terminal “–delete” will delete any items in the destination which you have removed from the source “–log-file” specifies the location for a log file to be kept. Other than that for those of you unfamiliar with bash script “$(date +%Y%m%d)” is used to inject the current date. So the filename for today would be 20080515_rsync.log

Go ahead and change the source file and destination file (last two sections of the command) and run it on your system. You will see that for a reasonable amount of data this is a quick process!

Now you know the command thats all well and good, it means that you can backup things when you want. However, we all know that this is easy to forget! So how about scheduling this task through a cron job?

You must begin by converting this command into a bash script. This is easier than it may sound. Just create the following (with your paths) in a text editor and save it to your home directory.


#! /bin/bash
sudo rsync -av –progress –delete –log-file=/home/ajc/doc/$(date +%Y%m%d)_rsync.log /home/ajc/src /media/vince/data_Backup

Next we must make the file executable

#sudo chmod +x /home/ajc/rsync-demo.sh

And then you have a file which you can click to run. However, we want automation, so here comes the cron bit

move the file to the root directory. (So that cron doesn’t ask you for a password when it runs)

#sudo mv /home/ajc/rsync-demo.sh /root/rsync-demo.sh

Then we want to open the crontab so we can schedule a job

#sudo crontab -e

here you should have several headings: m (minute of the hour) h (hour) dom (date of month) mon (month) dow (day of week) command. Now as you can see from this we have quite a wide range of choice as to when this script will be run. I chose 10pm every friday as the one I wanted. So the sequence was:

0 22 * * 5 /root/rsync-demo.sh

So 0 minutes, 22 hours, any date of the month, any month of the year, day 5 (friday) and the path to my script.

Simple. Now crontab will have opened in your default text editor so issue the command to save and exit (mines nano so Ctl + O then Ctl + X) and you will see a line confirming that the job has been added.

Done. Next time I will show you how to automate a backup to dvd!


hackthissite basic missions 1 - 5 HINTS

May 11, 2008

So you took my advice, or someone elses, and signed up at hackthissite.org. Well done, you are going to have some fun.

Struggling with the basic missions? Need a couple of pointers without spoilers? This is the right place.

Here we go with the basic missions 1 through 5.

Basic Mission 1

A nice introduction, probably pretty unrealistic. Think about where you can look at the code for this level, and really do learn HTML if you don’t know it. It will help. I cant really say more without a spoiler..

Basic Mission 2

Good stuff you got through the first mission, now this one isn’t as complicated as it first seems. You need to start thinking like a programmer though. Key point of the task: “he neglected to upload the password file…”
Now how would a password program work? what are the main components? if the bouncer asks for your name on the guest list, but he doesn’t have the guest list can you be wrong?

Basic Mission 3

Ok this one isn’t as easy. The password file is there. But where is it? Where might there be clues as to its location? what can you do with it once found?

Basic Mission 4

Now there are two ways to complete this one. I will hint along the path I took…

Examining the sourcecode shows his address. You need yours to be there…..
Where can you alter the code and save it? Can you run it from there with the new code intact…….

Basic Mission 5

Ok so he fixed that nice little flaw. Its time to get techincal. A knowledge of javascript will help you out… Thats the key point. Injections and document settings are a good place to start. If you want a spoiler for this one then leave a comment with some form of contacting you and ill give more info…

Well now you have passed the first 5 you must be feeling like quite a hacker. You are learning some very useful techniques as we go along, but don’t be fooled into thinking its all this easy. and you are probably wasting your time using these exploits on any websites as they will have been caught!

Until next time, happy hacking!


want to learn to hack?

May 11, 2008

I recently got very interested (once again) in network security and ways to bypass it. This happened while I was revising for an exam on networks. I decided it was time I stopped wondering and took a look into how hard hacking actually is.

Now I am sure many people have done this before, but if you haven’t STOP. there are so many websites out there claiming to teach you how to hack, but then they are filled with Script Kiddies asking “how do i hack my girlfriends myspace” or “how do I get someone’s msn password” etc etc. This isn’t hacking.

I fully recommend having a go at hacking if you are interested, its not as bad an illegal and terrorism-funding-fuelling as many people make out. You can do “good” hacking. Many people have a career in testing the security of networks and software. They are hackers.

So if you want to learn to hack I recommend starting with hackthissite.org a great website which teaches you all the basic skillsets of hacking. Its great fun, and that’s where I am picking it all up from. Ill be starting a series of posts on hints guiding people to the answers of the missions if they are struggling.


Anyone else have a HSBC bank account?

May 9, 2008

I’ve learned today that thanks to some amazing security in the Hong Kong server center one of their servers has gone missing. Yes thats right missing. In all honesty I can’t really see how during maintenance work the security is so lax that someone can walk off with a server.

Now HSBC assure us that “the data is protected by many layers of security” my bet is that the people who have taken this will know what they are doing…. and therefore will be able to get around it…. after all they beat your server center security!

No need to panic at the minute though, HSBC have promised to reimburse all fraud as a result of this, and it only held data on Hong Kong customers, so unless you live in Hong Kong, just be worried about the company as a whole rather than your money going AWOL.


well i haven’t posted for a while, new direction of blog i think!

May 8, 2008

I have decided to take a more personal approach on this blog. I realised that most of the time I was just giving personal opinions anyway. I have just started up a new blog on here called coloured by sound check that out if you have interest in music production.

So what have I been doing with my life.

Coursework. Loads and loads of coursework! and now its getting towards exams, so its revision. lots and lots of revision!

Which means on the whole my life has become a bit boring which is a shame because I just don’t have time for creativity at the minute, which is my passion. I just redesigned my homepage (here) today and that felt great!

Watch this space for my thoughts on my new passion, Zen gardening


its finally here! my EEE PC!

February 7, 2008

so just a quick post by means of an update, the thing is finally here in all of its glory, and has had a stupid amount of use over the last 2 days =] i will post a full review and instructions of how to install fluxbox and get it all nicely configured later, however for now just know this. It is very usable, and I have big hands =] but in addition to that, the OS is fairly good although not too well supported. Watch this space, more coming later!!


Asus EEE PC…. Im still waiting.

February 2, 2008

I have been waiting for over 2 weeks for delivery of my EEE pc! Are they really so popular that it is this hard to get hold of one? I just want my tiny gadget to play with haha…

…I am told it will be delivered on wednesday….this is already the 4th date I have had….my faith is questionable.


Daft Hands….amazing

February 2, 2008

If you have seen this, then you will know how amazing it is and watch it again, if not, its the greatest waste of someones valuable time imaginable, although it has to be said, the creator has amazing memory and hand co-ordination. Certainly worth a watch by anyone at all!


EMI, Universal and Warner Bros to make songs available for free download?!?!?

January 29, 2008

Ive heard a rumour around the net that EMI, Universal and Warner Bros are to offer a catalogue of masses of songs for FREE DOWNLOAD. Thats right, music to keep! FREE! Now Im not sure if people are talking about the SpiralFrog service which has recently launched, but this is my suspicion as I can’t seem to find anything else around the net other than this.

As for my knowledge here I know that Last.FM has just announced that they will allow users to stream songs a certain amount of times each day on an ad-based site, so that you can listen to the music you want to on the go, but cant keep it.

What’s going on with the music industry these days? I mean EMI and Universal have both said that they are going to start offering DRM-free music for sale, a complete contradiction of most huge record companies policy on Internet Piracy, but it will no doubt be welcomed by consumers, as many people are having issues with DRM!