A (beta) version of Messenger live is available.

Download Windows Live Messenger 2011:

http://explore.live.com/windows-live-messenger

On a side note:

The new Windows Live Messenger, differently from previous WLM versions, doesn’t give you the opportunity to modify and alter your nickname or display name . What’s worst is that Windows Live Messenger 2011 will only display your real name and surname which you previously set in your profile when you signed-up. Let’s see together how you can easily modify and add your nickname thanks to this little trick!
The only way to add a nickname to Windows Live Messenger 2011 is to modify your real name and last name. No other ways are possible at this time.

  • Open and login Windows Live Messenger 2011.
  • Click your user name using the small arrow on top of the messenger’s window.
  • Click Edit your Name in the menu.
  • A Windows Live Profile web page will be automatically opened in your browser. Modify or change the First Name and Last Name.
  • Click the Save button.
  • Done!
 

This little script helps to locate a (cisco) switch which has multiple connections on one port.
The result is a txtfile with the name, ip and port of the switch.

Software used:

  1. cut.exe
  2. sort.exe
  3. uniqe.exe
  4. tst10.exe aka Telnet Scripting Tool

The first 3 files can found in the CoreUtils archive.

The Telnet Scripting Tool can be found on Jerry Mannel’s blog

Preparations:

  1. Create a folder and place the files
  2. Create a file, eg switches.txt
  3. Save the source code, which can be found at the bottom of this article, as something.vbs

– Switches.txt should be in the following format:

ip-address;serietype;fullname (in most cases serietype=2950)

10.10.10.1;2950;switch-01
10.10.10.2;2950;switch-02

To run: open a commandprompt and type “wscript something.vbs”

The Code:

We begin by setting up our environment.

set wshshell = createobject("wscript.shell")
set fso= createobject("scripting.filesystemobject")
set switchlist = fso.opentextfile("switches.txt")
 
if fso.fileExists("result.txt") then
	fso.deleteFile "result.txt", true
end if
 
set result = fso.openTextFile("result.txt",8,true)

We loop switches.txt until all items are processed and make sure that previous created files are removed.

do until switchlist.atendofstream
 
	'--- Remove all previous files ---
 
	if fso.fileExists("output.txt") then
		fso.deleteFile "output.txt", true
	end if
	if fso.fileExists("temp.txt") then
		fso.deleteFile "temp.txt", true
	end if
	if fso.fileExists("double.txt") then
		fso.deleteFile "double.txt", true
	end if
 
	switch = switchList.readLine
	matrix = split(switch, ";")
	ip = matrix(0)
	typeswitch = matrix(1)
	switchname = matrix(2)
 
	if fso.filEexists("script.txt") then
		fso.deleteFile "script.txt", true
	end if

Since not every IOS uses the same commands, we split our code up.

if typeswitch = "2950" then
 
	set script = fso.openTextFile("script.txt",8,true)
		script.writeline ip & " 23"
		script.writeline "send " & """<passwd>\m"""
		script.writeline "wait " & """>"""
		script.writeline "send " & """term len 0\m"""
		script.writeline "wait " & """>"""
		script.writeline "send " & """show mac-address-table | include Fa0/\m"""
		script.writeline "wait " & """>"""
		script.writeline "send " & """quit\m"""
	script.close
 
	else 'type=2948
 
	set script = fso.openTextFile("script.txt",8,true)
		script.writeline ip & " 23"
		script.writeline "send " & """<passwd>\m"""
		script.writeline "wait " & """>"""
		script.writeline "send " & """set len 0\m"""
		script.writeline "wait " & """>"""
		script.writeline "send " & """show cam dyn | exclude 2/49\m"""
		script.writeline "wait " & """>"""
		script.writeline "send " & """quit\m"""
	script.close
 
	end if

The code above is necessary for using the Telnet Scripting Tool. More information about its use can be found on this blog.

commandoTelnet = "TST10 /r:script.txt /o:output.txt"
	wshshell.run commandoTelnet, ,True	
 
	wscript.sleep 3000
 
	if typeswitch = "2950" then
 
	commandoGrep = "cmd /c " & """grep -e " & """DYNAMIC""" & " -e " & """STATIC""" & " output.txt > temp.txt"""
	wshshell.run commandoGrep, , True
 
	commandoCut = "cmd /c " & """cut -c 39- temp.txt > test.txt"""
	wshshell.run commandoCut, , True
 
	else '=2948
 
	commandoGrep = "cmd /c " & """grep -e " & """[ALL]""" & " output.txt > temp.txt"""
	wshshell.run commandoGrep, , True
 
	commandoCut = "cmd /c " & """cut -c 39- temp.txt > test.txt"""
	wshshell.run commandoCut, , True
 
	end if
 
	commandoFindDuplicates = "cmd /c" & """sort test.txt |uniq -d > double.txt"""
	doubles = wshshell.run(commandoFindDuplicates, ,True)
 
	if fso.fileExists("double.txt") then
		set readDoubleTxt = fso.openTextFile("double.txt")
		do until readDoubleTxt.atendofstream
			routerOpPort = readDoubleTxt.readline
			result.writeline switchname & "(" & ip & ")" & "->" & routerOpPort
		loop
	readDoubleTxt.close
	end if
 
loop
result.close
Wscript.Echo "Script finished !"

The resulting output is:

switch-02(10.10.10.1)->Fa0/45
switch-02(10.10.10.2)->Fa0/46
switch-03(10.10.10.3)->Fa0/2
switch-06(10.10.10.4)->Fa0/33
switch-07(10.10.10.5)->Fa0/41
switch-08(10.10.10.6)->Fa0/24

Although this script can be further optimized, it does the job for me 🙂

The fullcode :


© 2012 Ceekes boarderline Suffusion theme by Sayontan Sinha