Archive

Archive for the ‘Tutorials’ Category

Mounting a Virtual/Network Drive with PowerShell

August 13th, 2009 1 comment

There’s multiple reasons why someone would want to mount a virtual or network drive, especially in an enterprise environment where many users don’t understand the concept of UNC paths or when older software doesn’t support long path names or UNC connections. Now there’s two things we need to know, is this a local path, or is it somewhere on the network. Once we know that we can get started. Read more…

Reversible AES Encryption in MySQL

August 13th, 2009 2 comments

Keeping sensitive information for any organization is a must in this day and age, and encrypting this data is one of your many lines of defense. Below are simple one liners on how to use AES encryption and decryption using MySQL as your database. When you call the AES_ENCRYPT function, MySQL will automatically return the encrypted value in a binary form, I’ll show you how to convert this into a hexadecimal value which you will need to do if you ever backup your database to SQL files. I was so happy to find that MySQL had this function built in, I can’t tell you how many types I ran through the PHP api looking for something that could meet my needs, I never even bothered to do a search for it on MySQL.

Note: Do not encrypt passwords!
Yeah, you read that correctly. Not everything needs to be decrypted. Imagine if you had a rouge system administrator, dba, or even worse, a hacker. Passwords need to be and should be hashed. Think about it for a minute, the only reason you would want to encrypt a password is if you want to be able to decrypt it at a later time. There’s no reason to do that, if a user forgets his or her password, it should be reset, and then they should be forced to change it on their next login. Read more…

Categories: Tutorials Tags:

Explained: What Does Applying Computer Settings… mean

August 10th, 2009 1 comment

You know how whenever you login to your Windows box you always see a message saying “Applying computer settings…” and it can sit there for what feels like forever!!! Well it annoyed me to no end, I wanted to find out what it really meant and see if there was a way to tell me what sort of voodoo Microsoft was running on my machine. So after a quick search I found 2 Microsoft KB articles, kb325376 and kb316243. Now, I have a meaningful description like applying group policy, playing log off sound, etc… Read more…

How To Create a Simple Contact Us Page in PHP

August 10th, 2009 No comments

Every website should have a "Contact Us" form, with spam as horrific as it is in this day age webmasters can no longer feel safe just pasting there email address on the websites. I created what I consider to be a bare bones contact us form, which you can see a very similar example of. Also, make sure to scroll past the source code to view some recommended changes and additions to the form. Read more…

Categories: PHP Tags:

Generate MD5 and SHA1 Password Hash

August 9th, 2009 No comments

It’s really simple to generate a MD5 and SHA1 hash using PHP, it’s so simple that I even considered not posting this blog. But then I found myself Googling a website to generate a MD5 hash while I was at work. So I created a simple form for you to create your own MD5 and SHA1 hash. Read more…

Categories: PHP Tags: , ,

Block IE7 and/or IE8 from Automatic Updates via the Windows Registry

August 9th, 2009 No comments

Here’s a quick and simple additions for you SysAdmins out there, how to block Windows XP from automatically downloading Internet Explorer 7 and IE 8. This is a simple addition to the Windows Registry Read more…

Sending eMails via PHP using the mail() function

August 8th, 2009 1 comment

Looking up the official PHP guide, we can see how to use the mail function, I’ll try and explain them here and give a few examples of how to add additional headers. Let’s move along the function header from left to right, the mail() function is declared as:

bool mail  ( string $to  , string $subject  , string $message  [, string $additional_headers  [, string $additional_parameters  ]] )

The first thing we see is that the mail function returns a bool, or boolean. So every time this function is run it will either tell you whether it was successfully sent or not. Now I want to be careful here, just because the message has been sent does not mean that the message ever made it to the users mailbox. The message could bounce back because you entered the wrong address, it was flagged as spam, the email address doesn’t exist anymore, etc… This is kind of like mail with the post office, just like when you put a stamp on a letter and mail it, you can say that the message was sent, but it doesn’t mean the message will ever be received. Read more…

Categories: PHP Tags:

List of Available PowerShell Cmdlets

August 7th, 2009 No comments

PowerShell is a completly new scripting language to me and as such there’s so much I don’t know about it, and while I can browse the net all day looking for information, I wanted to see how I could get PowerShell to tell me everything it knows first before I turn to the almighty Google. Searching for available Microsoft PowerShell Cmdlet descriptions (pronounced command-lets) and what they do I used the get-help command. After I ran this, I immediately noticed a Get-Help * command appear, so off I went. Read more…

Accessing WMI Information From PowerShell

July 25th, 2009 1 comment

I’m starting to learn how powerful the Windows Management Instrumentation aka Windows WMI is. One of the simpliest ways I found of accessing the information is via Windows PowerShell. Here is a simple PowerShell command that will return the Win32_OperatingSystem information. Read more…

Hello World

June 13th, 2009 No comments

Ok, well we all know it’s inevitable, my very first post has to be a hello world example, so let her rip…. Read more…

Categories: Tutorials Tags: , ,