Categories
Geeky/Programming

MSN Search Toolbar

I recently reinstalled the MSN Search toolbar. I used to run the beta, but had uninstalled it because it was dogging my machine. I really like the version 1.0 – I use it to find emails in seconds. I like the newer interface too. This tool is a must if you have tons of emails and files.

MSN Search Toolbar

Categories
Geeky/Programming

Mp3 ID3 Tags

What debacle, trying to parse out Mp3 ID3 Tags. There are Id3v1, Id3v2, and then a bunch of other abnormalites. Throw some WMA in there in you really have a mess. Parse it out of the file or shell out and get it from windows explorer, they still are goofed. What I wonder is how WMP10 gets the Album Artist from the CD. Because if you have a various artists cd, the tracks “Album Artist” meta data is all different. Goofy….

Categories
Geeky/Programming

Great Hackers (By Paul Graham)

This is great. The part about cublicles is so true!! I have always said I could be so much more productive in an office, I even wish I had a door and roof on my cubicle. I don’t think an office should show rank, it should be like he says in his essay.

I would have to disagree with some of the parts on “tools” though. Don’t get me wrong, Linux and Python and Perl are good tools, but I like Microsoft technologies (but that doesn’t mean I don’t use Linux). Also, I think the greatest challenge (and most fun part) is trying to get VB.net to do anything any other programming language can do, that is what I like about using VB.net. I feel like I have to make the language “prove itself” to other languages (Java, C#, C++, et. al). Also, on that note, last night I installed Mono on my Linux box so I can write C# code in Linux, how cool is that?

Great Hackers (By Paul Graham)

Categories
Geeky/Programming

How To Make Your Own Syslog Sever in VB.NET

In networks all over, many devices can send Syslogs to a syslog server. You can download Syslog Servers (like Kiwi) to capture and process the syslogs, or you can create your own server to catch all the syslogs on your network. Then you can parse them to a database and write your own reports of them, having full control of everything.

First, in VB.Net, you need to import some namespaces.

Imports System.IO
Imports System.Net.Sockets
Imports System.Net
Imports System.Text

Then, from you Main procedure, call a procedure called ListenForSyslogs

Private Sub ListenForSyslogs()

Dim ipeRemoteIpEndPoint As New IPEndPoint(IPAddress.Any, 0)
Dim udpcUDPClient As New UdpClient(514)
Dim sDataRecieve As String
Dim bBytesRecieved() As Byte
Dim sFromIP As String

Try
While True
bBytesRecieved = udpcUDPClient.Receive(ipeRemoteIpEndPoint)
sDataRecieve = Encoding.ASCII.GetString(bBytesRecieved)
sFromIP = ipeRemoteIpEndPoint.Address.ToString

FillLog(sDataRecieve, sFromIP)

Console.WriteLine(sDataRecieve)
sDataRecieve = ""
End While
Catch e As Exception
' just ignore for now
End Try
End Sub

If you analyze this code, it just sets up a endpoint on the IP you are running the program, and listens on port 514, the default syslog port. It will just run and run, and keep listening. Whenever you recieve data, then call FillLog procedure

Private Sub FillLog(ByVal sSyslog As String, ByVal sFromIp As String)

Dim sPriority As String
Dim sPath As String = System.Environment.CurrentDirectory & "Unprocessed"

sSyslog = sSyslog.Replace(vbCrLf, "")
sSyslog = Mid(sSyslog, InStr(sSyslog, ">") + 1, Len(sSyslog))
sSyslog = Trim(sSyslog)

sPriority = GetSyslogPriority(sSyslog)

Dim swWriter As New StreamWriter(sPath & "syslog" & Now.Month & Now.Day & Now.Year & Now.Minute & ".txt", True)
swWriter.WriteLine(sFromIp & "," & Now & "," & sPriority & "," & sSyslog)
swWriter.Flush()
swWriter.Close()

End Sub

What FillLog does it look at data recieved, and parses it out, removing line feeds, etc.

Then it gets the priority from a function GetSyslogPriority(). Then it writes out the info to a comma seperated txt file (for easy parsing later), that is named pathsyslogmonthdayyearminute.txt so for example, c:unprocessedsyslog0408200529.txt

It will append to that txt for for the minute it gets syslogs for. So you should probably have another process that will consume that txt file before the next hour rolls around.

Finally, the function that gets the priority:

Private Function GetSyslogPriority(ByVal sSyslog As String) As String
Dim sResult As String

If InStr(sSyslog, "-0-") Then
sResult = "Emergency (0)"
End If

If InStr(sSyslog, "-1-") Then
sResult = "Alert (1)"
End If

If InStr(sSyslog, "-2-") Then
sResult = "Critical (2)"
End If

If InStr(sSyslog, "-3-") Then
sResult = "Error (3)"
End If

If InStr(sSyslog, "-4-") Then
sResult = "Warning (4)"
End If

If InStr(sSyslog, "-5-") Then
sResult = "Notice (5)"
End If

If InStr(sSyslog, "-6-") Then
sResult = "Info (6)"
End If

If InStr(sSyslog, "-7-") Then
sResult = "Debug (7)"
End If

If sResult = "" Then
sResult = "UNKNOWN"
End If
Return sResult

End Function

To summarize, you can capture syslogs from your network to text files, and then create another program to read in the text files to a database and write reports. Creating the UDP listener on port 514, you can setup your network devices to dump syslogs to your box where you are running the syslog server you created. To troubleshoot network issues, syslogs will give you a good idea of what is getting denied, etc, and you can create your own homegrown Syslog Server using VB.NET in a few simple steps.

Enjoy!

Categories
Geeky/Programming

Linux

I hate that linux has the Ok and Cancel buttons backwards. What a PITA!!!

BTW, I just installed linux on a crap machine I have at home…I had XP pro on it…but the damn machine only has 192 mb of RAM, so it was dogging ass….The linux machine is running at 108 in use, the XP machine was running at 200 with practically nothing running…

Im running Fedora 2

First thing I do when installing Linux is install Firefox – much better than Mozilla….

Categories
Geeky/Programming

Microsoft MapPoint Location Server

I have been working on setting this up lately, one caveat…The admin guide says that the SQL server certificate “Friendly Name” must match the computer name. Well, when going through it, the computer name needs to match the “Issued To” FQDN on the certificate. Scratched the head a little on that one for a while. I don’t know if it is an oversight or if I am just reading the instructions wrong, but soon I should be able to query my mobile device lat/long! (if all goes well)..

Microsoft MapPoint Location Server

Categories
Geeky/Programming

Microsoft SQL Server 2005 Summit

Microsoft SQL Server 2005 Summit – Twin Cities…

Went to this all day Thursday in the cites. Went to the developer track. Learned about programming with SQL 2005, then about the new
SQL Server Integration Services and how to do data mining and things like that. Then learned about Advanced SQL Server Reporting Services and the changes in 2005, and then
learned about the new Service Broker Service in SQL 2005, and finished up by learning about SQL Server Express 2005, the replacement for MSDE 2000. Also there were two keynotes, in the
beginning and then the end, the first one was on IT infrastructure and how the Windows Server System can make it easier, etc. The last one was on SQL Server Tips and Tricks..Overall
it was a good experience, learning about SQL Server 2005 that will come out later this year, and how we can use it in our organization to make things easier and more efficient.

Categories
Geeky/Programming

Coding Slave

Free eBook in PDF format by Bob Reselman. Be forewarned, it is really geeky and for the true geeks to really understand. I downloaded it last week and read it, and it is a pretty good read.

Coding Slave

Categories
Geeky/Programming

Gmail

Looks like gmail is open for business, you can sign up from the google website

Categories
Geeky/Programming

PocketBlogger v1.1 Released

Changes in version 1.1

* ability to save username/password
* ability to paste into entry screens
* get recent posts (title and date) and then edit and delete

Other notes:
paste function will paste over everything written in entry box, so it would be best to write your whole entry in another text editor if you want to go that route.

saving username/password should work, if you are having issues with that, let me know and I can look into it. the program will connect to web on start and exit to save password locally encrypted.

still no setup program, but two dll files have been added, so you need to copy the exe and the 2 dll’s to the folder of your choice on your PPC for pocket blogger to work…

Download Pocket Blogger v1.1