WordPress – Contact 7 Form – Using A ShortCode Parameter To Determine Email Recipient

The Problem

The challenge was that different WordPress pages pointed to a form where the only difference on the form was the recipients email address. This meant for every page a form needed to be created, this meant a lot of overhead as a large number of forms needed. All the same apart from the recipient email address.

Continue reading

FreeNAS 11.3 – Setting Up OpenVPN Server In A Jail

This article documents how to setup an OpenVPN server on a FreeNAS Jail, allowing user(s) to be able to access the Freenas UI via the VPN but also other areas of the network where the Freenas server resides.   The user will need to specify a username, password to be able to login.  The password can be set by the user, however they will also need Google Authenticator to provide a  6 digit code.

Continue reading

Generating RSA Public Modulus, Public Exponent & Private Exponent As HexDecimals

I was messing around the other day with RSA encryption and came across the site http://nmichaels.org/rsa.py. It demonstrates how to use RSA encryption to encrypt/decrypt a text string. I was interested in the key generation for this, this page just has a generate button however, I wanted to understand how I could generate my own Public Modulus, Public Exponent & Private Exponent in the hexdecimal format. Continue reading

Generating a MD5 Checksum With Powershell

Recently, I was comparing .wim file images used for PXE booting and installing Operating System Images using SCCM OSD.  I was found that I received a Winload.exe boot problem when trying to build devices off a remote server.  The .wim file it was using looked the correct size in bytes, but generating an MD5 checksum against it showed that the copy on the remote server was different from the source .wim file.

Please find the Powershell function below to generate an MD5 against a file.

Function Get-Hash($file){
 
    $algo = [System.Security.Cryptography.HashAlgorithm]::Create("MD5")
    $stream = New-Object System.IO.FileStream($file, [System.IO.FileMode]::Open)
 
    $md5StringBuilder = New-Object System.Text.StringBuilder
    $algo.ComputeHash($stream) | % { [void] $md5StringBuilder.Append($_.ToString("x2")) }
    $md5StringBuilder.ToString()
 
    $stream.Dispose()
}

SCCM Client 32bit Client Stopping Registry Keys In SYSWOW64 Context Only Using SYSNATIVE

Background

I use SCCM, Operating System Deployment (OSD) and Microsoft Deployment Toolkit (MDT) 2010 update 1 to deploy Windows 7 SP1 (x64) and application installs during the build process.  The problem was a .vbs script which populates some auto-logon keys called via SCCM OSD during the application installation process was being hit with registry redirection, forcing any registry entries to go into
HKLM\Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\WinLogon
rather than HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon. Continue reading

Windows 7, Windows XP Enable A Domain Or Local Auto Log On Via Registry Keys

Within Windows it is sometimes necessary for a device to automatically log on, without prompting a user for a user id or password.  This could be for the purpose of running a device as a kiosk, where a the device starts auto logs on and then the kiosk application loads full screen without any user interaction.  There are obvious security issues with this, and to keep this article simple and concise lets ignore these for the time being. This article shows how it is possible with adding the appropriate registry keys. Continue reading