How To Recover Your Starcraft Anthology CD Key

I recently ran into an issue where a buddy of mine was unable to find his original Starcraft disc and the CD case, but he had his Broodwar disc, which meant that he was without a CD key.  Hoping to help him, I tried to use a  few recovery tools, but they all failed to work, or were horribly outdated.  I was later determined to figure it out non-the-less, and with a few minutes of your time, you can too.  There is one tool we will need however, and that’s going to be a hex editor.  In this example, I’m using the CD key of “9999-99999-9999”.

Requirements:

  • Frhed (Hex Editor, FOSS)
  • Working Starcraft Installation (which uses the CD key you lost)
  • Starcraft / Broodwar CD (to load up the game)
  • Windows Vista/7/8/8.1

Instructions:

  1. Make sure Starcraft is fully up to date.  (At the time of this writing, it’s at 1.16.1.)
  2. Open Starcraft, and get to the Battle.net Login Screen but do _not_ log in.
  3. Hit Alt+Tab on your keyboard to get back to your Desktop.
  4. Hit Ctrl+Shift+Esc on your keyboard to open up the Windows Task Manager.
  5. Select the “Processes” tab, and find “StarCraft.exe” in the list.
  6. Right click on “StarCraft.exe” in the list and select “Create Dump File”.
  7. Take special note of where it saved the dump to and navigate to that directory.  (Usually, it’s in the current user Temp folder, which you can get to by entering “%TEMP%” into the location bar of any Explorer window.)
  8. Copy the dump file to your desktop.  It should be named “StarCraft.DMP”.
  9. Open up Frhed, and select File > Open to open the Starcraft dump file on your desktop.
  10. Select Edit > Find and Replace > Find… from the menu.
  11. In the Find What box, enter “Starcraft\SWAR\lang\grid.cpp” and hit Find.  (This should bring you to the first result.)
  12. Hit F4 two (2) times.  (This should bring you to approximately the point where you’ll find your key.)
  13. On the right side, look for a string starting with “mo” proceeded by some random numbers.  (The image below shows you what you should be looking for.)
  14. Those random numbers are your CD key. (The area in the image highlighted in yellow is the CD key.)

Starcraft Hex Dump

For those that have a history with hex editors, in my quick tests, the CD key was not at the same offset, so I can’t really give a specific offset to try.

Switching to Viostor: QEMU/KVM after Windows (XP) installation

This process is not as hard as one would expect. Once it’s completed, there is a big performance increase. (At least in my case there was.) I did this in XP, but I see no reason why it won’t work in Windows 2003, Vista, 7, etc.

A requirement is to have the Viostor drivers on your virtual machine before you continue. They can be downloaded on the KVM Driver Download page.

Before I explain anything, my configuration in the beginning looks as follows…
qemu-kvm \
-drive file="./WindowsXP.qcow2",if=ide,boot=on \
-m 1024M \
-smp 1 \
-soundhw ac97 \
-vga std \
-name "Windows XP Professional" \
-net nic,model=virtio \
-net user \
-usb

  1. To start off, we need to create an empty disk image file, or temporarily link an existing one to the XP virtual machine. That can be done by adding -drive file="./temp.qcow2",if=virtio,boot=off \ to the configuration.
  2. Launch the VM with that configuration option added, and once Windows XP loads, it will ask for the drivers for the SCSI controller, which is Viostor. Point it to the directory that you extracted the drivers to, and it should install.
  3. After Windows XP installs the drivers, shut down Windows XP.
  4. Remove that temporary line that you added in Step 1 and change your real drive to say “if=virtio” instead of “if=ide”.
  5. After making that change, startup Windows XP again, and when Windows loads, it will reinstall the Viostor driver for that hard drive.
  6. Reboot, and you are finished.

In the end, my configuration looks like:
qemu-kvm \
-drive file="./WindowsXP.qcow2",if=virtio,boot=on \
-m 1024M \
-smp 1 \
-soundhw ac97 \
-vga std \
-name "Windows XP Professional" \
-net nic,model=virtio \
-net user \
-usb

Tunneling with SSH and Firefox

This guide will explain how to create a SSH tunnel to use with Firefox. Creating an SSH tunnel will create an encrypted connection to an outside machine to visit websites that may be inaccessible from a specific location. (Work, School, etc.) If my web site gets blocked at some point, it will probably be because of this article. The idea of this is not exactly to circumvent filters, but it works perfectly for that too.

Part 1: Create an SSH Tunnel
Unix / Linux / OS X:

  1. In the terminal type: $ ssh <SERVER> -D <PORTNUMBER> -l <USERNAME> -C

With the above command, <SERVER> is the remote server running the SSH service you will be using to create the tunnel. <PORTNUMBER> is any number between 1025 and 65535, and <USERNAME> is the username you will be using to connect to the remote server. After issuing that command, if you don’t get any errors, jump to Part 2.

Windows:

  1. Download PuTTY.
  2. Launch PuTTY. On the initial screen, enter the remote address of the server you will be connecting to in the “Host Name (or IP address)” field.
  3. In the ‘Category’ list, expand the ‘SSH’ option, and select ‘Tunnels’.
  4. In the ‘Source port’ field, type in any number between 1025 and 65535. Select ‘Dynamic’ under the ‘Destination’ field, and click on the ‘Add’ button.
  5. Click ‘Open’ at the bottom of the window to start the connection.
  6. A new window will open up and prompt you for your user credentials. Enter your username and password. While entering your password, nothing will show up on the screen.
  7. After submitting your credentials, if you don’t get any errors, you should be successfully connected to the remote SSH server.

Part 2: Configure Firefox

  1. First of all, if you don’t have Firefox, go to GetFirefox.com and download yourself a copy of it. If you are on a Windows machine that is not your own, consider grabbing yourself a copy of Portable Firefox for this guide and throwing it on a flash drive.
  2. After your copy of Firefox is up and running, whether it be Firefox or Portable Firefox, it’s time to install FoxyProxy. Add the add-on to Firefox, and restart Firefox when asked.
  3. Launch the FoxyProxy options. From the ‘Tools’ menu, hover over FoxyProxy and jump down to ‘Options’. From the status bar, right click on the FoxyProxy icon, and select ‘Options.’
  4. Click the “Add New Proxy” button.
  5. A new window will appear. “Proxy Details” will be the tab initially selected. If not already selected, select “Manual Proxy Configuration”. In the “Host or IP Address” field, enter ‘127.0.0.1’ and in the ‘Port’ field, enter the port number you used in Part 1. Make sure the check box for “SOCKS proxy” is checked. We will be using “SOCKS v5,” so select that.
  6. Click on the ‘General’ tab, and in the “Proxy Name” field, give the proxy a name that summarizes what this proxy will do for you, or where it will connect you to. You could even keep it as generic as “SSH Tunnel.”
  7. Click the “OK” button in the “Proxy Settings” window. You will be prompted with a message about not adding any web addresses to the domain white-list. That’s fine, just click “OK” again. Once back on the main “FoxyProxy Options” window, just click the ‘Close’ button to close it.
  8. Time to activate the proxy. From the ‘Tools’ menu, hover over FoxyProxy and select “Use Proxy <PROXYNAME> for all URLs.” From the status bar, right click on the FoxyProxy icon, and select “Use Proxy <PROXYNAME> for all URLs.”
  9. At this point, any web site you visit will be proxied through your SSH tunnel. If something is not working for you, go back and check all of your settings from Part 1 and 2.
  10. When you are finished using your proxy, be sure to disable FoxyProxy. If you don’t disable FoxyProxy and your connection from Part 1 is not running in the background, your connection to the internet is going to appear dead. To do so, from the ‘Tools’ menu, hover over FoxyProxy and select “Completely disable FoxyProxy.” From the status bar, right click on the FoxyProxy icon, and select “Completely disable FoxyProxy.”

This may help someone…

Unfortunately, I have not posted anything in a while. Well, hopefully this will make up for that and help someone.

Folder opens every time you log into Windows.
Well, in my case, it was “C:\Program Files\Dell” that kept on constantly opening. Here is why, and how I fixed it.
First of all, the folder is launching on startup most likely because of a mistake in the path to the program. For example:
C:\Program Files\Dell Support\...
is different than
"C:\Program Files\Dell Support\..."
Notice how one has the quotes, and the other does not. This is the issue, because the quotes tell Windows that that entire thing is the path. Otherwise, Windows thinks the path ends at “C:\Program Files\Dell” Since there is a space after “Dell”. So, just look around the registy for paths formated as such, and hopefully you will find the issue.
Now, you may be asking me why there can be a space in “Program Files”. Well, I have two theories for that, but I have not bothered to test either of them.
1. Windows can’t open a folder called “C:\Program” because it does not exist, so that line is ignored.
2. Windows by default is aware of a space in-between ‘Program’ and ‘Files’.

Unable to Remove / Modify programs in the Add / Remove applet in Windows
and / or
Missing programs in the Add / Remove Applet
and / or
Missing information for the listed programs in the Add / Remove applet.

Yeah, this one is one of those problems I would hope would get caught sooner than later. What it boils down to is something / someone removing all the uninstall information from the Windows Registy. Yes, I mean virtually everything. Your best chance at fixing this issue would be to go back with a System Restore point to a time that it worked.
The program that broke it for me and removed absolutly everything with my uninstall information was “Yahoo! Browser Services”. Luckly, the second time around before I tried to remove this program, I exported my uninstall information from the registry so I could reimport it after if it broke.

Linux Kernel Video Modes

I figured this may be of some use to someone, as you can’t really find these in any obvious spot. To use any of these codes, all you need to do is add vga=code to the kernel parameters when booting. Using 1600×1200@32 bits as an example, the kernel parameter would be vga=799. If you want to be asked every time you boot the kernel, use vga=ask.

320×200 640×400 640�480 800×500 800�600 896×672 1024×640 1024�768 1152�720 1280�1024 1440�900 1600�1200
4 bits 770 (302) 774 (306)
8 bits 768 (300) 769 (301) 879 (36F) 701 (303) 815 (32F) 874 (36A) 773 (305) 869 (365) 775 (307) 864 (360) 796 (31C)
15 bits 781 (30D) 801 (321) 784 (310) 880 (370) 787 (313) 816 (330) 875 (36B) 790 (316) 870 (366) 793 (319) 865 (361) 797 (31D)
16 bits 782 (30E) 802 (322) 785 (311) 881 (371) 788 (314) 817 (331) 876 (36C) 791 (317) 871 (367) 794 (31A) 866 (362) 798 (31E)
24 bits 783 (30F) 803 (323) 786 (312) 882 (372) 789 (315) 818 (332) 877 (36D) 792 (318) 872 (368) 795 (31B) 867 (363) 799 (31F)
32 bits 804 (324) 809 (329) 883 (373) 814 (32E) 819 (333) 878 (36E) 824 (338) 873 (369) 829 (33D) 868 (364) 834 (342)

Edit: For the record, I do realize that this table does not fit entirely within this layout. If you want to see the whole thing, just copy and paste it into a spreadsheet or something. Otherwise, I may make it into it’s own page or something eventually.