$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
26 Mar // php the_time('Y') ?>
Microsoft has releaseed the Remote Server Administration Tools (RSAT) for Vista SP1. RSAT enables IT administrators to remotely manage roles and features in Windows Server 2008 from a computer running Windows Vista with SP1. It includes support for remote management of computers running either a Server Core installation or the full installation option of Windows Server 2008. It provides similar functionality to Windows Server 2003 Administration Tools Pack.
You can find RSAT here.
3 Mar // php the_time('Y') ?>
A new website (blog) was opened for the Jedi Apilib and Jedi Security Library. I invite you all to take a look!
You can find it here
2 Mar // php the_time('Y') ?>
Several months ago I wrote about encrypting and decrypting RDP passwords. I left one thing open: encrypting the password up to the full 1329 bytes as mstsc does.
Many people were curious about it so I hope the answer is not a disappointment because it’s actually really simple (but I took me a while to figure that out nonetheless). In what I figure is an attempt to hide the password length mstsc always fills up the password with zeroes until it has 512 bytes length.
Then the password is encrypted like I described earlier which gives us a 1328 bytes password hash. So we have one mystery left, how to reach the 1329 bytes size which still is a strange value since the password is in Unicode which takes 2 bytes per char (so the size should be even).
As it turns out, mstsc just adds a zero!
Remote Desktop Password Encryption & Decryption Tool (52961 downloads)2 Mar // php the_time('Y') ?>
In a previous article I wrote about changes in utildll in vista that breaked compatibality for Terminal Server. Even though release notes for Service Pack 1 don’t indicate changes or fixes in this area my testing shows that Microsoft has taken over the Windows 2008 implementation of utildll to Vista.
This is a good thing, because applications depending on utildll work again. I have updated JwaWinsta for SP1, all Vista versions of the utildll functions are renamed to VistaRTM and all Safe functions were updated to check for SP1. This means that the Safe functions can be used on all OS versions and Service packs! You are strongly advised to use only the Safe functions.
Some observations with SP1:
Update: I just tried to install hotfix KB941561 but this fail with the error: The update does not apply to your system. If you do want to get this bug fixed you need to manually replace winsta.dll (take ownership and set permissions to full control). winsta.dll from hotfix KB941561 (X86) (2630 downloads)
2 Mar // php the_time('Y') ?>
For my Terminal Server unit in the Jedi Security library I use 2 TObjectList descendants to hold a list of Terminal Server Sessions and Processes. Consider the sample below which connects to a server and enumerates all sessions:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | var ATerminalServer: TJwTerminalServer; i: Integer; begin ATerminalServer := TjwTerminalServer.Create; ATerminalServer.Server := 'TS001'; try if ATerminalServer.EnumerateSessions then begin // Now loop through the list for i := 0 to ATerminalServer.Sessions.Count - 1 do begin Memo1.Lines.Add(ATerminalServer.Sessions[i].Username); end; end; except on E: EJwsclWinCallFailedException do begin // Handle Exception here end; end; // Free Memory ATerminalServer.Free; end; |
In the sample I loop through the sessions with a for loop. Even though Delphi supports the for in loop since Delphi 2005 it’s not possible to use this in TObjectList descendants, so we cannot use this:
1 2 3 4 5 | // Now loop through the list for Session in ATerminalServer.SessionList do begin Memo1.Lines.Add(Session.Username); end; |
To make this possible we need to implement GetEnumerator and an Enumerator class:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | TJwSessionsEnumerator = class private FIndex: Integer; FSessions: TJwWTSSessionList; public constructor Create(ASessionList: TJwWTSSessionList); function GetCurrent: TJwWTSSession; function MoveNext: Boolean; property Current: TJwWTSSession read GetCurrent; end; constructor TJwSessionsEnumerator.Create(ASessionList: TJwWTSSessionList); begin inherited Create; FIndex := -1; FSessions := ASessionList; end; function TJwSessionsEnumerator.GetCurrent; begin Result := FSessions[FIndex]; end; function TJwSessionsEnumerator.MoveNext: Boolean; begin Result := FIndex < FSessions.Count - 1; if Result then Inc(FIndex); end; |
Now we add a function with the name GetEnumerator in the SessionList class:
1 2 3 4 | function TJwWTSSessionList.GetEnumerator: TJwSessionsEnumerator; begin Result := TJwSessionsEnumerator.Create(Self); end; |
And that’s really all!