ExVB.com Online!
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
ExVB.com (the blogging site for Visual Basic experts) is finally online, after all this time, and many strugles with various blog solutions, it’s up, yay…
With WordPress-MU being massively buggy and .Text requiring a Ms SQL server that I don’t have, I finally resorted to just using several copies of WordPress 1.5, keeping it up to date will be a challenge, but meh… Better than waiting and delaying the project even more.
phpBB 2.0.13 released – dumb*ss coders strike again
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
In the latest round of embarrassing updates, the phpBB Group has released a new version of phpBB, 2.0.13, to fix a large, and obvious security error allow anyone to gain admin rights, oh, just to make it better, it works on all version < 2.0.13. With a POC floating around, let the hacking begin.
Update: A working exploit was released, showing just how simple it is to wreak havoc.
Read more…Suicide Bomb Kills 125
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.

Iraqi workers clean debris near a large pool of blood at the scene of a suicide attack in the city of Hilla, February 28, 2005. (Source)
Something has to change…
Random User-Agent in VB.NET
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
Here’s a simple little example of a dynamic User-Agent in VB.NET. It uses a fairly large list of UA strings, and uses 1 randomly. The code is fairly simple, should be easy to add to any application that needs it.
Code
Module modRandomUA Dim strUA() As String Public Sub BuildList() Dim sr As IO.StreamReader sr = New IO.StreamReader("browser_list.txt") strUA = sr.ReadToEnd.Split(ControlChars.CrLf) sr.Close() End Sub Public Function GetUA() As String Randomize() Return strUA(Int(Rnd() * strUA.GetLongLength(0))).Trim End Function End ModuleUsage
Module Main Sub Main() BuildList() Dim wcClient As New System.Net.WebClient Dim bytBuffer As Byte() wcClient.Headers.Clear() wcClient.Headers.Set("User-Agent", GetUA()) bytBuffer = wcClient.DownloadData(strURL(i)) End Sub End ModuleYou’ll need this as well: UA List
Why would somebody do that to Eric?
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
It seems the personal web site of Eric Sink has been hacked & defaced. Why? What drives people to do such heartless acts? Eric takes his valuable time to help so many people and share his valuable insight, and some miscreant hacker wannabe comes along and does this. It’s wrong, in so many ways, it’s just wrong.
Read more…My greatest work!
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
I am thrilled!
I have done it!
I have completed the most useful program ever developed… at least if you are like me and hit Caps-Lock every couple minutes. I know, I had you all excited, but although this really isn’t that great, it was fun to hack together and at least I’ll use it. You can get the exe, sounds and code here. To exit it, just press & hold caps-lock & ctrl for a couple seconds. It’s really a very simple application, the core is in this code:
Read more…ZipSight 2004.1 Released
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
Imspire’s smallest product has just received an update. After a couple days of implementing a new registration system and cleaning up the code, the latest ZipSight is ready for public review.
Simple INI API
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
While storing settings in a INI file is no longer in vogue, so developers (including myself) still find value in this old method of save a program’s settings. The advantages of using INI files instead of the system registry may be numerous, one of the main reasons I use it is portability, by saving a single file I can move the entire settings for my program to any other computer.
Read more…Get CPU Speed
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
This was created as a request on a forum I’m on, it queries the registry for the speed of the first CPU, adjusting for multiple CPU support would be simple.
Option Explicit Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" ( _ ByVal hKey As Long, _ ByVal lpSubKey As String, _ phkResult As Long _ ) As Long Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" ( _ ByVal hKey As Long, _ ByVal lpValueName As String, _ ByVal lpReserved As Long, _ lpType As Long, _ lpData As Any, _ lpcbData As Long _ ) As Long Private Declare Function RegCloseKey Lib "advapi32.dll" ( _ ByVal hKey As Long _ ) As Long Private Const REG_DWORD = 4 Private Const ERROR_SUCCESS = 0& Private Const HKEY_LOCAL_MACHINE = &H80000002 Public Function GetCPUSpeed() As Long Dim lngResult As Long Dim lngKeyHandle As Long Dim lngValueType As Long Dim lngBufferSize As Long Dim lngBuffer As Long lngResult = RegOpenKey(HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System\CentralProcessor\0", lngKeyHandle) lngResult = RegQueryValueEx(lngKeyHandle, "~MHz", 0&, lngValueType, ByVal 0&, lngBufferSize) If lngValueType = REG_DWORD Then lngResult = RegQueryValueEx(lngKeyHandle, "~MHz", 0, 0, lngBuffer, lngBufferSize) If lngResult = ERROR_SUCCESS Then GetCPUSpeed = lngBuffer End If End If End FunctionGet Default Mail Client
This post was imported from an old blog archive, and predates the creation of AdamCaudill.com.
This is another code example made by request for a forum member, it simply retrieves the default value from
HKEY_CLASSES_ROOT\mailto\shell\open\commandwhich should be the default mail client.Option Explicit Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" ( _ ByVal hKey As Long, _ ByVal lpSubKey As String, _ phkResult As Long _ ) As Long Private Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" ( _ ByVal hKey As Long, _ ByVal lpValueName As String, _ ByVal lpReserved As Long, _ lpType As Long, _ lpData As Any, _ lpcbData As Long _ ) As Long Private Declare Function RegCloseKey Lib "advapi32.dll" ( _ ByVal hKey As Long _ ) As Long Private Const REG_SZ = 1 Private Const ERROR_SUCCESS = 0& Private Const HKEY_CLASSES_ROOT = &H80000000 Public Function GetDefaultMailClient() As String Dim lngResult As Long Dim lngKeyHandle As Long Dim lngValueType As Long Dim lngBufferSize As Long Dim strBuffer As String lngResult = RegOpenKey(HKEY_CLASSES_ROOT, "mailto\shell\open\command", lngKeyHandle) lngResult = RegQueryValueEx(lngKeyHandle, "", 0, lngValueType, ByVal 0, lngBufferSize) If lngValueType = REG_SZ Then strBuffer = String(lngBufferSize, " ") lngResult = RegQueryValueEx(lngKeyHandle, "", 0, 0, ByVal strBuffer, lngBufferSize) If lngResult = ERROR_SUCCESS Then If (InStr(strBuffer, Chr$(0))) > 0 Then GetDefaultMailClient = Left(strBuffer, (InStr(strBuffer, Chr$(0))) - 1) Else GetDefaultMailClient = strBuffer End If End If End If End Function