inportb

Hacks

Install Windows 7 from USB Pen Drive Using Grub2 and Grub4Dos

by Jiang on Jul.19, 2010, under Computing, Hacks

I wanted to install Windows 7 on my netbook, but I didn’t have access to a Windows environment from which I could run bootsect.exe or install Grub4Dos; so I figured I’d install Grub2 on my USB disk using Ubuntu, have Grub2 chainload Grub4Dos, and finally let Grub4Dos chainload the Windows installer. This worked for me:

  1. Prepare a fresh NTFS partition on the USB disk /dev/sdX and mount it at /mntX1, then copy all files from the Windows installer disc or image into /mntX1
  2. Install Grub2:
    cd /mntX1; sudo grub-install --no-floppy --root-directory=/mntX1 /dev/sdX; sync
  3. Download the latest Grub4Dos, and unpack grub.exe into /mntX1
  4. Create /mntX1/boot/grub/grub.cfg:
    set timeout=0
    set default=0
    menuentry “Install Windows” {
         linux16 /grub.exe --config-file=”root (hd0,0); chainloader (hd0,0)/bootmgr”
    }

I was surprised that such a complicated setup actually worked. Be sure to substitute your own values for /mntX1 and /dev/sdX. In the Grub4Dos config, (hd0,0) refers to the first partition on the boot disk; you’d need to change that if you want to boot the installer from a different partition.

Popularity: 5%

3 Comments more...

Installing Chameleon Using Linux

by Jiang on Jul.18, 2010, under Computing, Hacks

So you want to experiment with the Chameleon boot manager, but you don’t have a Mac or Windows environment handy? Here’s how you could prepare a Chameleon-bootable USB key (or any other kind of disk, for that matter). Be warned that the following procedure would overwrite the target disk’s MBR, effectively wiping all data on said disk. Make sure that you do not target the wrong disk. Naturally, what you do with this information is your responsibility ;)

  1. Install hfsprogs (available in the Ubuntu repositories, if you use Ubuntu).
  2. Get the Chameleon binary package from <http://chameleon.osx86.hu/> and untar it, then navigate to the i386 directory in your terminal.
  3. Type `sudo dd if=boot0 of=/dev/sdX`, where /dev/sdX is the target disk; this is the step that cleans up the disk and loads a fresh MBR containing the stage-0 boot code.
  4. Make a new HFS+ partition (type AF) using fdisk. Let me know if you need help with this.
  5. Format the partition by doing `sudo mkfs.hfsplus /dev/sdX1`.
  6. Type `sudo dd if=boot1h of=/dev/sdX1` to install the stage-1 boot code to the bootsector of the new HFS+ partition.
  7. Now, type `sudo mount /dev/sdX1 /mnt` to mount the partition, where /mnt is your mount point of choice.
  8. Type `sudo cp boot /mnt/` to copy the final piece of Chameleon over.
  9. Unmount the partition using `sudo umount /dev/sdX1`.

Now you should have a shiny new Chameleon boot disk. I hope this helps.

Popularity: 5%

Leave a Comment more...

Kindle Firmware 2.5 With Root

by Jiang on Jun.15, 2010, under Computing, Hacks

The new Kindle firmware seems to be all the rage these days, though the manual installation package for early adopters had been quite elusive until now. While the new features are quite neat, early adopters found themselves unable to apply any of the previously-established hacks. Firmware hacking is popular because it enables extensive customization options. I was impatient to install the new firmware, but I didn’t want to lock down my Kindle or wait for new hacks. What now?

Why, I simply installed the usbNetwork hack before upgrading to 2.5.2. The usbNetwork hack installs a Telnet daemon and a SSH server on the Kindle, while allowing the Kindle to be controlled over USB. It is a simple way to gain a root terminal, and it still works after the new firmware is installed. Hopefully, this paves the way for further hackery.

It should be noted that users who already have the new firmware cannot apply the usbNetwork hack (the process terminates with error code U004). If you’re interested in using it, install it while you still have the 2.3.* firmware.

So how exactly do you get a root console on the Kindle, with the usbNetwork hack? First, you put the Kindle into debug mode (in general, to issue any command, just follow these five steps and change what you type during the fourth step):

  1. press [Home] to go to the home screen
  2. type any key on the keyboard to enter search mode
  3. press [←] to blank the line
  4. type ;debugOn (the ; character, and many others, is available in the [SYM] menu)
  5. press [↵] to issue the command

Next, issue the `usbNetwork command on the Kindle, and plug it in. It should appear as a “RNDIS/Ethernet Gadget” rather than the usual mass storage device. By default, the interface should be configured with IP address 192.168.2.1, and the Kindle could be accessed at 192.168.2.2. How you go about setting up the interface depends on the operating system on your desktop. Telnet and SSH should be running at this point, either of which would give you a root shell.

Users have reported the interface dying after a couple of minutes. Through the console, it is possible to disable the daemon that periodically resets network connections as the Kindle goes to sleep:

/etc/init.d/netwatchd stop

/etc/init.d/Netwatchd stop

Popularity: 10%

Leave a Comment more...

On Facebook, the Spam Never Ends

by Jiang on May.09, 2010, under Computing, Hacks

This morning I woke up to an inbox full of suggestions to “like” a certain page on Facebook. Curious, I decided to have a look. It turned out to be a service promising to show you who views your profile (which, of course, is absolutely absurd), and all you had to do was press ctrl+c, alt+d, ctrl+v, and enter. Apparently, a lot of people did this and found themselves wondering how their browsers got hijacked.

(continue reading…)

Popularity: 10%

2 Comments more...

Slash OpenVZ Memory Usage by Shrinking Thread Stack

by Jiang on Mar.23, 2010, under Computing, Hacks

I recently bought a small virtual server (OpenVZ, 128mb memory, 256mb burstable) for web hosting. I knew that it would be a challenge to work with limited memory, especially since OpenVZ doesn’t swap like Xen. For starters, I went with a 32-bit minimal Debian setup, because 64-bit pointers use twice as much memory as 32-bit pointers. Apache was also out of the picture, but Lighttpd easily filled the role. MySQL was also heavily tweaked to limit resource usage. All in all, I had a happy little system that used 60mb-100mb of memory.

(continue reading…)

Popularity: 18%

Leave a Comment more...

The Omeglean Society

by Jiang on Feb.21, 2010, under Computing, Hacks

Almost every conversation on Omegle contains the ubiquitous “ASL” (age/sex/location) query. You might be asked if you were American (“STAR”) or if you live near the city of St Albans (“STA?”). More recently, a band of Twitter users have set out to find each other on the Web service for strangers. An instant messaging service that pairs random strangers anonymously, Omegle attracts a variety of users.

The majority of users behave as expected. Anonymity leads to abusive language and general silliness online. Advertisers have taken advantage of the unfiltered and unmoderated service using robotic and human zombies alike. Still others engage in cybersex. In a world where identity does not matter, sophomoric behavior is the norm and civility has no bearing.

(continue reading…)

Popularity: 8%

4 Comments more...

New Kindle 2… Covered!

by Jiang on Jan.18, 2010, under Hacks

I now have a shiny new cover for my Kindle 2 (okay, it’s matte, but you get the idea). With a gutted notebook, a bit of felt, and some time, I stitched together a lightweight carrying case. It’s not going to protect the Kindle against a fall, but it’d sure keep it clean. The only drawback is that it covers the speakers, but I’m happy as long as the 3.5mm audio jack is available. As a bonus, the transparent cover shows what’s on the screen even when closed.

The felt back keeps the device strapped to the cover.

Popularity: 6%

Leave a Comment more...

Omegle Group Chat, Revisited

by Jiang on Dec.10, 2009, under Computing, Hacks

Since the introduction of Omegle Group Chat, a netizen by the name of OmLeif (presumably Leif K-Brooks of Omegle) joined my IRC channel and expressed his dissatisfaction with both the spam bots and my solution. Although he declined to discuss his plans for improving Omegle, he did promise to work on the problems. We knew that change was afoot.

When I checked my chat bot this morning, I discovered that it was being subjected to reCAPTCHA challenges. This welcome change has drastically cut down the amount of spam seen on Omegle. While it appeared that Group Chat was no longer necessary (its original purpose was to create an oasis amidst the spam) or viable, those in my IRC channel asked for more. Knowing that Group Chat still had a place, I set out to rewrite the entire framework.

The fundamental changes are:

  • the bot no longer needs to maintain tens of simultaneous connections, since the spam rate is much lower
  • IRC support sits at the core of the system instead of having been added on as an afterthought
  • should the bot encounter a reCAPTCHA challenge, users present in the channel will be able to solve the challenge via the reCAPTCHA API

To see Group Chat in action, feel free to join #inportb on freenode. Or if you want, you might just luck out on Omegle… Have fun out there!

Popularity: 14%

5 Comments more...

Omegle Group Chat

by Jiang on Nov.24, 2009, under Computing, Hacks

Omegle is a website used to communicate with random, anonymous people across the Internet. Thousands of users troll the website every day, following its slogan to “talk to strangers.” Because of the lack of moderation, there has also been a recent proliferation of spam bots and human spamvertisers, and sometimes it takes 20 wasted connections before one could have a normal conversation. Now, with the Omegle Group Chat extension, users can finally talk to multiple strangers simultaneously while avoiding spam! If you have been using Omegle lately, you might have come across this introductory message:

You have been randomly selected to join an exclusive Omegle group chat…

The fundamental rules are the same: there is no need to reveal your identity and you may leave at any time. I hope Group Chat has been an enjoyable experience for you. Since you’re here, I might as well answer some common questions:

  • Group Chat is neither part of nor endorsed by Omegle
  • Yes, this is a real chat room on Omegle
  • Up to around 20 people are in the chat room at once
  • The chat room is powered by a proxy bot written in Python
  • The script uses less than 4MB of memory and less than 40MHz of processor time
  • The chat lags purely because of Omegle’s AJAX interface
  • Group Chat is bridged with IRC! Join #inportb on freenode for less lag

Due to the recent proliferation of spam, I have implemented a number of spam filters, both automatic and manual, designed to keep the chat clear of junk. Here’s a sampling of the cruft caught by the filters:

** STAT:        spambots/s      22.2272497218
13317 :: bot filter – hi, 18/f/new york, wanna see my nüde video? GO HERE: hxxp://……/8hMmzE
85117 :: bot filter – hi, 20/f/florida, wanna see my naked video? GO HERE: hxxp://……/8hMmzE
67937 :: bot filter – hi, 20/f/new york, wanna see my pr0n video? GO HERE: hxxp://……/8hMmzE
54294 :: bot filter – hi, 20/f/new york, wanna see my pr0n video? GO HERE: hxxp://……/8hMmzE
83998 :: bot filter – hi, 19/f/new york, wanna see my pr0n vid? GO HERE: hxxp://……/8hMmzE

Here’s some other crud that I would not dare post on any blog… and on average, the spam rate is approximately 80%. Enjoy spam-free Group Chat!

Update: there has been more work on Group Chat.

Popularity: 22%

17 Comments more...

Simple Small-Scale Distiller

by Jiang on Jul.10, 2009, under Hacks

I had always wanted a small distiller that I could use to purify some of the substances that I have been collecting, but it was just hours ago that I came up with a simple working design. The distiller is pictured below. As you can see, it is simply a small plastic tube punched through a large plastic tube (poke a snug hole through the large cap), with a glass tube connected to the large plastic tube by a bent needle. Here’s what each part does.

(continue reading…)

Popularity: 3%

1 Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!