• 06 Jan 2009 /  Computing

    Well, this is a short and sweet text guide to create a new administrator account on Vista, if for some reason you have no more. This was created for a friend who for some reason deleted every single administrator account on his PC.

    This guide has been UNTESTED, and will only work on Vista - not XP.

    Following the steps below will create a *new* administrator account on your PC.
    if you get stuck, are unsure, or think errors may be showing, I can’t help. I don’t have Vista. Remember: Follow the steps carefully.
    It shouldn’t mess up your computer if you do any of the steps wrong, but you never know.

    Download this file:
    http://sourceforge.net/project/downloading.php?groupname=infrarecorder&filename=ir0462.exe&use_mirror=internap

    This is a 100% free and simple CD burning program, you need it to burn the .iso file listed below

    Download this file:
    ftp://mirror.switch.ch/mirror/backtrack/bt3-final.iso

    This is the CD image for something that can create a new Vista admin account. This is a BIIIGGGG file.
    It can take 5 hours + to download.

    Instructions:
    1. Download the 2 files listed above
    2. Install the .exe file. This is the program Infrarecorder, a CD burner.
    3. Insert a blank CDR-RW disc into your CD drive, and click “Do nothing” or “Cancel” if a message pops up
    4. Open Infra recorder
    5. At the top menu, Go to Actions->Burn Image…
    6. Select bt3-final.iso and click ‘Open’
    7. A window will pop up. Find the “Write speed” drop down list and select something lower, like 28x.
    8. Click the ok button
    9. The easiest way to tell when it’s done is when it ejects the CD.
    10. Once the CD is burned, put it into your CD drive and immediately reboot the computer.
    11. If once it starts booting off of the CD, it stops for a while and an option is to press the spacebar, press the space bar
    12. Now.. If all is done right so far, text should be flying across your screen like a rabid squirrel
    13. After a few minutes or less of text flying around, eventually a background image will appear, along with a mouse saying “<<< Backtrack 3″.
    - If no image appears, and you see red text reading “Welcome to BackTrack 3″, type the following w/out quotes and hitting enter after each.
    “root”
    “toor”
    - Now skip to step 17.
    14. Now, in the bottom left corner there will be an icon with a pencil and paper. Right click the icon, go to Panel menu -> Add Application to Panel -> System -> Konsole
    15. A new icon will appear in the bottom left corner. It is black, and should be the second item. Click it.
    16. A new window will pop up.
    17. With the shell window open, type the following without quotes and pressing enter after each one
    *** THE FOLLOWING ARE CaSe SeNsItIvE
    “cd /mnt”
    “ls”
    “cd hda1″
    - If it says that it can’t find it, you’ll have to figure out what it named your hdd.
    “cd Windows”
    - If it says it can’t find Windows, try “WINDOWS”
    “cd System32″
    - If it says it can’t find System32, try “system32″
    “mv Utilman.exe Utilman.old”
    “cp cmd.exe Utilman.exe”

    18. Eject the CD and reboot the computer
    19. At the login screen do the following:
    20. Press and hold the Windows key (usually between CTRL and ALT) and press U
    21. A black window should pop up.
    22. Type the following into the window without quotes and pressing enter after each:
    “net user backupadmin 3MERGENCY /add”
    “net localgroup administrators backupadmin /add
    23. Reboot your computer and login with the username “backupadmin” and password “3MERGENCY”

    … Now. If you happen to wipe out all admin accounts on your computer again, restart your computer and go to step 20

    Tags:

  • 04 Jan 2009 /  Uncategorized

    In this little tutorial I’ll take you step by step through creating a sticky note.

    Finished product:

    6

    Let’s begin.

    First of all, create a new image (Preferably a little larger than the size of your sticky note, just so you have a little working room). I’m creating mine at 128×128.

    Then, if you don’t have the layers and paths window open, you will need to. Go to Windows->Layers,Channels,Paths… A new window will pop up.

    Now select the paths tool. Here’s the icon:1

    What we must do next is to create points so we can make a nice, smooth, outline for the stickynote. Dealing with the paths tool can be pretty confusing, especially if you don’t know what you’re doing. Considering many of you readers may be new to GIMP, or just the paths tool, I will go into a bit of detail on how to handle it.

    Placing points
    Click in one of the corners of your image with the paths tool created. A circle will appear. Click the mouse again somewhere else, and other circle will appear and so on and so forth.

    Deleting points
    Made a mistake? Well, click the point and press the backspace button to delete it. Oddly enough, the delete key doesn’t work.

    Moving points
    Of course you’re going to mess up or at least want to tweak the position of the points you place. To move a point, first select the paths tool then move the mouse to a middle of a point (the circle). Then click and drag it. You’ll know it’s ready to move the point when you see the standard arrowed cross in the top right corner of your mouse. ** Don’t forget: If you move points before finishing the design, you may want to change which point is selected. After all, when you left click again it creates a point stemming from the currently selected point.

    Curving
    This is pretty hard to do unless you create a new point for the sole purpose of being curved. To create a point with an associated curve, click and drag the mouse instead of just clicking. It takes a bit of moving to get the desired curve. Look at the diagram below. The box labeled 1 is what controls the curve. Move that box or the point to alter the curve.

    2

    The box labeled 2 will not affect the curve.

    Finishing (Connecting beginning and ending points)
    Make sure you have the last point selected (the one you want to connect to the other end). Then hover your mouse over the other end point, hold control, and click. Tada!


    Finished making the outline for your stickynote? Here’s what my outline looks, just for a guideline in case you’re stuck and can’t figure out  how you want yours to look:

    3

    Now we need to turn that into a selection, because we can’t do much with it as a path. In the Layers, Channels, and Paths window which we may or may not have opened at the beginning of this post, click on the 3rd tab.

    4

    Then click on the path that you want to make a selection (Unnamed, usually. May be Unnamed#1, etc, if you had trouble with the thing). Then right click it, and click “Path to selection”.

    Alright now if you’ve used any image editing software before, you know how to deal with selections.  Now you can put a gradient/solid color etc inside the selection. I decided to go with a 2 color gradient. The colors are:  ffde6d and ffe58c.

    With the selection still active, click the first tab in the Layers,Chan,Paths window to go back to the layers. Then create a new layer. This step is optional, to add some shading. Icon: 5

    Now, change the foreground color to something a bit darker, like efc944. Next, scroll down on your tools window at the bottom to reveal more options. Change the pressure to something low, I used 4.0. Next select a the size 9 fuzzy brush.  Then, with the new layer selected, shade around the edges or wherever you feel like shading. If it’s too dark, simply change the opacity of the layer. Mine came out dark so I changed the opacity to 45 and it looked nice.

    Yay! We’re done! Viner hand size 12 font is a good font to use.

    6

    Tags: ,

  • 31 Dec 2008 /  Web Design

    Finding a fast, reliable webhost can be quite a challenge - especially if you don’t want to spend any money. If you just want to host a blog or a forum, then search google - there’s plenty of free services out there that allow you to do that easily. However, if you want to build your own site or control every aspect you’ll want to find a webhost.

    Here’s some basic tips

    • Check the age of the supposed “company”. Nowadays, the hosting market has become very saturated and reselling has become popular.
    • Don’t fall for “overselling”. This is when a host will offer you absurd amounts of bandwidth and space at no cost. These high numbers are just there to attract you - and it works.
    • Check for forums. Many hosts are starting to create forums for their users to chat on. Check the number of users and activity and use it as a potential guide.
    • Look for reviews on the internet. This one is very important - other users will post their experiences, good and bad, about the host. A word of warning though: Quite a few hosts have been caught paying people to write good reviews for them. If the host is truly bad, the number of bad reviews will still clearly outshine the good.
    • Try to find their uptime stats. You wouldn’t want to find out that your host that claimed 98% uptime has less than 80%.
    • Look at their features. For a free host, mysql/sendmail/fsockopen and a few others can easily lead to abuse and are often not available on free hosts. If you absolutely need these, make sure you check if the host offers it before signing up.
    • Read their TOS. This can be a very important one - if you want to host a proxy site, that generally won’t happen on free or paid hosting due to the CPU intensity of these sites. Also it is important because some hosts don’t want to host games or photo galleries, which may be what you want to create. Save your time, effort, and possibly money by at least skimming through the TOS. On top of that, remember when I mentioned overselling earlier? Well, this becomes key in their TOS. Often, it will say that the hundreds of GBs of bandwidth they offer you must not exceed ___% bandwidth for files that aren’t text based like html/php. If you want to host some images/software etc, this can be critical.

    Good luck in your searches!

    Tags: ,

  • 26 Dec 2008 /  Uncategorized

    First off, to avoid confusion I’m talking about the candy malted milk balls. Not burgers. So anyway, if you’ve had probably 2-3 boxes of whoppers in your life, you’ll realize that some of the whoppers in a box (3 or less usually), are bad/disgusting/icky. SOoooo I had 2 bad whoppers in this last box I had, and after the first one I set off on a way to avoid eating the bad ones. Now really, it’s quite easy to tell which whoppers you shouldn’t eat!

    Here’s a picture of a bad whopper:

    Not pleasant! So, what are the signs?

    1. A not-so-round shape. Loppy, bulgy, whatever.
    2. It looks like a squirrel attacked it. It’s got little scratch-like marks all over it
    3. Cut it in half and what do you see? Looks like the inside of some alien egg.
  • 24 Dec 2008 /  Programming

    So, a long time ago (probably 2 years), I created 2 functions using the GameMaker engine that did super simple XOR encryption. XOR encryption is often debatable as being true encryption or not; but I call it encryption anyway. It’s easy to crack and should NOT be used for sensitive data, there are stronger methods out there. Now, onto the simple and short source.


    public String xorEnc(int encKey, String toEnc) {
    /*
    Usage: str = xorEnc(integer_key,string_to_encrypt);
    Created by Matthew Shaffer (matt-shaffer.com)
    */
    int t=0;
    String s1="";
    String tog="";
    if(encKey>0) {
    while(t < toEnc.length()) {
    int a=toEnc.charAt(t);
    int c=a ^ encKey;
    char d=(char)c;
    tog=tog+d;
    t++;
    }

    }
    return tog;
    }
    public String xorEncStr(String encKey, String toEnc) {
    /*
    Usage: str = xorEnc(string_key,string_to_encrypt);
    Created by Matthew Shaffer (matt-shaffer.com)
    */
    int t=0;
    int encKeyI=0;

    while(t < encKey.length()) {
    encKeyI+=encKey.charAt(t);
    t+=1;
    }
    return xorEnc(encKeyI,toEnc);
    }

    I’m not going to bother explaing much how these two functions work. Using them is simple and you should read the comments in the functions, and I’m pretty sure all you want to do is rip them anyway. xorEncStr basically converts the string key you provide it into an integer and passes it to xorEnc. Both of the above functions have been tested to work!

    Sorry. Really, I indent my code, just WordPress doesn’t :(

    Tags: , , ,

  • 22 Dec 2008 /  Web Design

    This was sad, utterly sad. The first comment to this blog was a SPAM comment. I hate spam, so I’m going to add a few lines to my .htaccess file to prevent that IP from coming back and spamming me again.

    What can you do with .htaccess banning?
    1. Ban an IP
    2. Ban an IP range (100.100.100.xxx), where xxx can be anything and will still be blocked
    3. Ban a domain name. Ex: proxy1.c0oproxeh.com, proxy2.c0oproxeh.com will both be unable to view the site

    Let’s get started. Here’s how you can block a single IP

    order allow,deny
    deny from 100.100.100.1
    allow from all

    Just switch out “100.100.100.1″ with the IP you want to block. That was pretty easy, wasn’t it? Now on to multiple IPs.

    order allow,deny
    deny from 100.100.100.1
    deny from 100.100.100.2
    deny from 100.100.100.3
    deny from 100.100.100.4
    deny from 100.100.100.5
    allow from all

    Now there are some tricky spammers out there who own multiple IPs with only slight variations. The most common way to attempt to prevent these spammers is to block every IP that has the first 3 sections the same (100.100.100). This is called IP range banning

    order allow,deny
    deny from 100.100.100
    allow from all

    Note that the above code will block 100.100.100.1, 100.100.100.2 ETC.

    Last thing: Blocking a domain name (Like .com, .net etc)

    order allow,deny
    deny from c0oproxeh.com
    allow from all

    Final note: You can mix and match all of these! Here’s an example

    order allow,deny
    deny from c0oproxeh.com
    deny from 100.100.100
    deny from 200.200.200.2
    allow from all

    There ya go! Not hard at all. Just remember: Many hosts, mostly free hosts, will block custom .htaccess files.

    Tags: , ,

  • 21 Dec 2008 /  Web Design

    You’re probably familiar with any major company having a nice, custom page when you land on a page that no longer exists. In this post, I will describe how you can add your own custom error pages with htaccess (assuming you are the webmaster).

    First off, here are some common error codes and what they mean:

    400: Bad Request
    401: Authorization required
    403: Forbidden
    404: Page not found
    500: Server error

    Now, those might not mean much to you, but the most common error page and one that you should set is 404. If you so much as rename a file, visitors may be coming from google and the file doesn’t exist. Instead of seeing a bland white page (or your host’s 404 page), you should change it.
    Here’s a sample .htaccess file

    ErrorDocument 404 /404.html
    ErrorDocument 500 /500.html
    ErrorDocument 400 /400.html
    ErrorDocument 401 /401.html
    ErrorDocument 403 /403.html

    You don’t have to name the file to match the error number, you can name the 404 error page “GoodbyeWorld.html” if you wanted.

    Now: Some tips for creating this file. On Windows, you cannot easily create this file. It doesn’t like having only extensions for filenames. To solve this problem, simply create your file and name it htaccess or htaccess.txt. Then, upload it to your web server and from there you can change its name (from ftp or a control panel).

    The most common problem people may face is due to their hosts: Many hosts, more specifically, many free hosts do not allow you to have a custom .htaccess file.

    Tags: ,

  • 21 Dec 2008 /  Programming

    There are just some things that google can never tell you, and no matter how hard you try to search for it you may never find what you are looking for. That happened to me when I tried to find out how to convert a String to an Integer array in Java. So, here’s the simple function that will do this:

    public static int[] strToInt (String inp) {
    int[] toRet = new int[inp.length()];
    int i = 0;
    while(i < inp.length()) {
    toRet[i]=(int)inp.charAt(i);
    i++;
    }
    return toRet;
    }

    This function goes through every character of the string and gets the integer value of the character and adds it to the integer array. When it’s done adding everything, it returns the integer array with the same length as the string.

    (PS: Sorry for unindented code; I’ll have to find a better code plugin..)

    Tags: ,

  • 21 Dec 2008 /  Uncategorized

    So as a small number of you will notice, I wiped out the old site. The main reason being that I have just begun moving most random software related content to a fresh, new site about my software: matt-soft.com. The site is just being fleshed out, so most of the content from this site won’t be on there for a few days. This means that a lot of google visitors (who mostly want GameMaker examples) will just have to wait a bit. Considering that a good majority will get 404s, I’m going to bustle about and get up a 404 page by tomorrow which links to matt-soft.com.

    So. What exactly will be in this blog? I have no idea yet. Maybe it’ll have some code snippets/examples, bits about my life, and random things I find interesting. We’ll find out.