My power supply came in the mail this week for my Toshiba A200 notebook so I decided to add Windows 7 to the installed OS list (currently booting Leopard 10.5.2 and Ubuntu 9.04). As always Windows hijacked the master boot record with it’s inferior boot manager – I had to fix this immediately.
GRUB is not as complicated as people make it out to be. In fact it is a very elegant solution to handling multi-boot platforms. Here’s a quick guide to steal your MBR space back from Windows :
- Boot into live CD such as Ubuntu or Knoppix – DSL works well and is fast.
- Open a terminal, if your live CD boots into a GUI – press ALT+CTRL+F2 to access a different console.
- type “cfdisk”
This part is tricky – you must find where GRUB currently lives – in the case of the image below (my rig) sda5 is where Ubuntu is installed – in GRUB this is equal to hd0,4 – since GRUB counts from 0, not 1.
Once you have determined what partition holds grub root files – close cfdisk (q) and type :
grub
root (hd0,X) <– where X is the grub count from 0 to your current Linux installation*
setup (hd0,0)
This will opverwrite Windows MBR installation and give access back to GRUB hooray! Next step would be adding Windows boot back to grub which has already been covered in my “How To Dual Boot Hackintosh + Ubuntu” article.
* I have a difficult time expressing this simple idea – if Linux is installed on SD5 then grub should say (hd0,4). If your boot partition is /dev/sda87, GRUB would be (hd0,86) – I hope this helps.
EDIT : I forgot to mention a huge congratulations to Microsoft for making an operating system that looks and feels like Vista with the intermittent stability of XP – huge upgrade IMO.. still far from Leopard.
There are tons of giveaways and contests out there that make you jump through hoops filling out way too much information only to receive a million unwanted emails. I have set my browser homepage to one I really do not like in order to remind myself to fill out the form every day (I will not tell you which one because I want to win!).
A Quick Briefing : cURL is used to send / receive data to and from other computers via command line. Since I know PHP quite well I decided to install the php-curl module and instantly got an automated spambox, data grabber, post submitter and whatever else one can do with a normal browser – the best part is I only have to set it up once.
I now have a crontab installed to spoof a web server into thinking I am being referred from an affiliate link, in which it then sends my information as well as some hidden values and instantly generates a report (which is emailed to me). I know this is shady business however the last thing I won was a Nevada pull ticket when I was 8 and I couldn’t claim the winnings – fuck you world LOL.
Here is just a taste of something you can set up yourself – should be quite simple to modify to your needs.
#!/usr/bin/php
$name = "Gregory";
$email = array("email1@gmail.com", "email2@yahoo.com", "email3@slopsbox.com");
$zip_code = "90210";
$url = 'http://the-url-to-post-to.com';
$user_agent = "Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)";
$referer = 'http://crappy-affiliate-program.com/index.php?affiliate=poor_sucker";
foreach ($email as $mail) {
$params = "name=$name&email=$mail&zip_code=$zip_code&hidden_value1=someValue";
$ch = curl_init();
curl_setopt($ch, CURLOPT_REFERER, $referer);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result=curl_exec ($ch);
curl_close ($ch);
}
?>
Really all you have to do is investigate the <form…> on the page you are attempting to post to – examine all text inputs, textareas, checkboxes, radio buttons and hidden values. You should be able to form the POST data string, similar to JSON (key=>value pairs).
As for captcha, just hope your target is either lazy or stupid – most of those things are a pain in the rear end.
Enjoy!




