Wednesday, July 18, 2007

Qcheck

So started messing with Qcheck for some Lan/Wan speed checks. Should be fun...

Btw direct link to the silly prog is here

http://www.ixiacom.com/downloads/products/qcheck/qcinst3.0.exe

Wednesday, May 30, 2007

Server Reboot

Had to finally reboot our file server, it was the record winner of the office with about two years and a half uptime! Of course when I rebooted it at 5:00am I wasn't expecting any corrupt directories :-( grr so I got to drive in at 5:00 this morning!

Wednesday, May 23, 2007

Access-based enumeration! is awesome

Ok so I have been meaning to turn this feature on, bascially it only lets people see folders that they have access to! Very nice if you have a ton of folders inside a share! Get it here http://www.microsoft.com/downloads/details.aspx?FamilyID=04a563d9-78d9-4342-a485-b030ac442084&DisplayLang=en

Tuesday, May 15, 2007

Working half of email checker

Half of the email checker (email coming in) is working. Code is here -> http://snippets.dzone.com/posts/show/4024

Thursday, May 10, 2007

So finished one half of the email server checker

I finished 1/2 the email checker, its extremely simple it just creates an email with a guid and sends through an external mail account, and then creates a file with the same guid. On the other side it pulls in messages from a different local mail account and compares the subject to the guid subject stored in the file. If it matches within the alloted time fram then it is assumed that the email server is recieving emails. Now I'm going to play with xmppy to send me an IM when the process fails.

Monday, May 07, 2007

Email server checker, or the email equivalent of ping

How come I can't find any software to check that an email server is working? I can find plenty of software that checks that SMTP is up, but I want a system that actually sends an email and then the remote box sends back a reciept that it has been recieved. Almost like the email equivalent of ping.

Friday, April 20, 2007

ARGHHH cookies

So I finally found out that you need to create a CookieContainer if the server you are talking with uses cookies for authentication (which of course the piece of crap kronos server does) anyways I almost gave up but I'm glad I got it to work!!!!! This dude was very helpful http://blogs.msdn.com/dgorti/archive/2005/08/16/452347.aspx

Code snippet for sending XML to kronos

Dim outxml As New MSXML2.DOMDocument40
Dim inxml As New MSXML2.DOMDocument40
'Set Receiving page
Dim strURL As String = "http://seattle-kronos/wfc/XmlService"
Dim xmlHTTP As New MSXML2.ServerXMLHTTP40
'Set path of xml file to pass via HTTP
Dim xmlPath As String = "c:\test.xml"
outxml.load(xmlPath)

With xmlHTTP


Try
.open("POST", strURL, False)
.send(outxml)
inxml = xmlHTTP.responseXML
MsgBox(inxml.xml)
Catch ex As Exception
MsgBox(ex.ToString)
End Try

End With

Wednesday, April 04, 2007

Mail-enabled calendars are cool

So I just learned about Mail-enabled calendars. I think they are nifty. To set them up you fire up your exchange system manager, admin groups, domain, folder, public folders, right click on your desired public calendar, all tasks, mail enable. Now from your exchange client you can right click on this calendar and you have an exchange settings tab that you can see what email address you can send your requests to. So how to use: create an appointment as usual but also add an invitation to the newly mail enabled public calendar. This will automagically add it to that public calendar.

Thursday, March 08, 2007

A cool way my boss thought of to let a user know what their computer name is by editing the ToolTip (in the registry called the InfoTip) to %USERNAME% on %COMPUTERNAME%
Like below

**************************

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}]
@="My Computer"
"InfoTip"=hex(2):25,00,55,00,53,00,45,00,52,00,4e,00,41,00,4d,00,45,00,25,00,\
20,00,6f,00,6e,00,20,00,25,00,43,00,4f,00,4d,00,50,00,55,00,54,00,45,00,52,\
00,4e,00,41,00,4d,00,45,00,25,00,00,00

Thursday, December 14, 2006

How to install java remotely, silently, and turn off the really annoying autoupdate.

PSEXEC (Use the newest version since old versions had problems with executing arguments)

psexec \\computer -c -d -e -i -u administrator -p PASSWORD jre.exe /S /V"/qn JAVAUPDATE=0"

Tuesday, October 31, 2006

Getting an external timer working for cerberus was a lot harder then it should be, especially since the procedures in the install instructions just plain don't work :-)

This is for version 3.2.1 Release (Build 324)

I tried the wget approach, no luck :(

I tried the php approach (btw typo for C:\php\php.exe C:\wwwroot\inetpub\cerberus-gui\cron.php ) the path should be c:\inetpub\wwwroot\) but I would always get, this IP is not authorized to run the schedule, even though I had added 127.0.0.1, tried other masks etc..) :(

So.. the way I finally did get it to work is using the windows port of lynx from here http://www.pervalidus.net/cygwin/lynx/ (at the bottom)

I set up a windows task using "C:\Program Files\lynx\lynx.exe" --dump http://localhost/cerberus-gui/cron.php?verbose=1

with a start in: "c:\program files\lynx\"

You also of course need to set it to external timer in configuration -> scheduled tasks and you also need to add the getmail scheduled task and make sure it is enabled.

Hope this helps someone else out there!

Saturday, October 21, 2006


This is a picture of the caulk monster, this beast is to keep the shower from leaking as much....

scary, i know

Tuesday, October 17, 2006

You need google desktop search! and really for only one reason, its opens up a quick search window that you can launch any app from!

Friday, October 13, 2006

I wanted to create a program that would take a whole bunch of files and then create folders based off of the created date in year/ month/ day format. Here it is. Most is based off of
http://www.daniweb.com/code/snippet451.html

# retrieve the file information from a selected folder
# sort the files by last modified date/time and display in order newest file first
# tested with Python24 vegaseat 21jan2006

import os, glob, time

# use a folder you have ...
root = 'c:\\test\\' # one specific folder
#root = 'D:\\Zz1\\*' # all the subfolders too

print '-'*60 # just vanity

date_file_list = []
for folder in glob.glob(root):
print "folder =", folder
# select the type of file, for instance *.jpg or all files *.*
for file in glob.glob(folder + '/*.*'):
# retrieves the stats for the current file as a tuple
# (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)
# the tuple element mtime at index 8 is the last-modified-date
stats = os.stat(file)
# create tuple (year yyyy, month(1-12), day(1-31), hour(0-23), minute(0-59), second(0-59),
# weekday(0-6, 0 is monday), Julian day(1-366), daylight flag(-1,0 or 1)) from seconds since epoch
# note: this tuple can be sorted properly by date and time
creation_date = time.localtime(stats[9])
#print image_file, lastmod_date # test
# create list of tuples ready for sorting by date
date_file_tuple = creation_date, file
date_file_list.append(date_file_tuple)

#print date_file_list # test

date_file_list.sort()
date_file_list.reverse() # newest mod date now first

print "%-40s %s" % ("filename:", "Creation Date:")
for file in date_file_list:
# extract just the filename
folder, file_name = os.path.split(file[1])
# convert date tuple to MM/DD/YYYY HH:MM:SS format
file_date = time.strftime("%m_%d_%y", file[0])
year_date = time.strftime("%Y", file[0])
month_date = time.strftime("%m", file[0])
day_date = time.strftime("%d", file[0])

print "%-40s %s" % (file[1], file_date)
print year_date
print month_date
print day_date

DateDir = 'c:\\DateTest\\'+ year_date + '\\' + month_date + '\\' + day_date
if not os.path.isdir(DateDir): #check whether the dir exists, if not create it
os.makedirs(DateDir)

print "xcopy /Y /F " + '"' + file[1] + '" ' + DateDir

os.popen("move /Y " + '"' + file[1] + '" ' + DateDir).read()
Went looking around for how to get the date of yesterday in python. Here are two ways...

from time import gmtime, strftime

#Get yesterdays date and time (from http://www.thejackol.com/2005/07/01/yesterdays-date-in-python/)

now = time.time()
today = time.localtime(now)
yesterday = strftime('"%a-%m/%d/%Y"',time.localtime(now - 60*60*24))

or

import datetime
now = datetime.datetime.now()
one_day = datetime.timedelta(hours=24)
yesterday = now - one_day
print strftime('"%a-%m/%d/%Y"',yesterday.timetuple())

Tuesday, September 26, 2006

Some very usefull python: Zipping a file

zip = zipfile.ZipFile('/afile.zip', 'w', zipfile.ZIP_DEFLATED)
zipdir('/adirectory/', zip)
zip.close()

I couldn't get this to work unless I specified zipfile.ZIP_DEFLATED of course after reading I found out the default is zipfile.ZIP_STORED. If you don't specify ZIP_DEFLATED it creates a zip file that has 0% compression (basically just stores it) go figure :-)

Another thing I kept banging my head against was how to hide a dos popup window from a py2exe created file. A combination of
os.popen("xcopy /Y /F " + ServerPath + " c:\\").read()

PLUS in the setup file for py2exe change setup(console=['whatever.pyw']) to setup(windows=['whatever.pyw'])

Cool stuff this python

Tuesday, September 19, 2006

Jarnal is a great program for writing on PDF's (it also does a ton of other really nifty things for note taking etc...) I suggested a batch file that makes it pretty easy to annotate PDF's http://www.dklevine.com/general/software/tc1000/jarnal.htm
Haven't posted anything for a while but I have been messing with some interesting things. Been working on creating a portal site using metadot http://www.metadot.com/ I had the hardest time getting LDAP authentication to work but here is a quick tutorial on what finally made it go.

Metadot: Setup LDAP authentication for active directory on server 2003

Under manage/config/

Click enable for LDAP registration

Click Modify under registration params

LDAP server should be your LDAP server, either name or IP

BASE DN:
This is where the LDAP searches will begin

In my environment it is

OU=National Users,DC=nffc,DC=local

One way you can find this out is by using a program called OldCmp http://www.joeware.net/win/free/tools/oldcmp.htm

Run this command oldcmp -report -age 1 -users (This generates a report of users passwords that are older then 1 day)

Open this report and look at your users, it should help in figuring out what your base DN is.

Next you need the user unique identifier, this was confusing for a bit, but this is the filed that LDAP is going to look up against. (Which is also why you can assign it a label in case your want to compare on something different then email address)

A couple of 'User unique identifier in LDAP directory options' are: Mail, userPrincipalName or CN more info http://www.computerperformance.co.uk/Logon/LDAP_attributes_active_directory.htm

Mail ---> The users email address
userPrincipalName ---> The users logon on name i.e. jschmoe@mydomain.local
CN ---> The users name i.e. joe schmoe

I configured it to use LDAP for authentication only so I have not messed with profile management yet.

The last hoop to configure is click the radial button to select DN: (you have to do this for active directory)

Now you need to supply a user that can do LDAP lookups. After you create this user you can use OldCmp to find out its DN

An example DN is cn=metadot,ou=service accounts,ou=national users,dc=nffc,dc=local
and then of course set the password.

Tuesday, June 20, 2006

When you go to deploy software using active directory you cannot have the msi located on an NT4.0 server share. For some reasons the permissions do not work. Also, you need to allow domain computers access to the share or it won't work either