Google has launched Google Talk
Thursday, August 25, 2005 9:36 AM
Google's Web site late Tuesday provided a link to download Google Talk and stated that the software "enables you to call or send instant messages to your friends for free-–anytime, anywhere in the world." Google's messaging program is linked to Google's Web-based email program, Gmail, both of which are in a beta, or test, phase. While Google Talk was expected, some industry observers questioned what innovation Google could add to lure loyal users and their millions of buddies away from established instant-messaging applications.

One advantage to Google Talk could be its ability to connect with users of competing services. Google Talk is based on the Jabber open-source standard, which allows consumers to connect with other messaging systems that work with Jabber, such as Apple Computer's iChat, GAIM, Adium, Trillian Pro and Psi.
by deon | with no comments
F.E.A.R - SINGLE-PLAYER Demo
Friday, August 05, 2005 1:36 PM

The demo will offer a single level featuring "intense and exhilarating action" and "pulse-quickening paranormal chills." As part of a classified strike team, you will have to find and eliminate intruders who have taken over a multibillion-dollar aerospace compound.

You can start downloading the file @ 17:00

Link http://www.vugames.com/file_list.do?gamePlatformId=1833

by deon | with no comments
Monad - MSH Day 2
Thursday, July 14, 2005 9:19 AM

Some cool things about MSH

Accessing different providers as a file system, like the registry:
MSH> cd HKLM:\Software
MSH> dir
Hive: Registry::HKEY_LOCAL_MACHINE\Software

SKC  VC Name                           Property
---  -- ----                           --------
 0   2 AdMuncher                      {AppPath, MigrateDone}
 2   0 Adobe
10   0 Ahead
 5   0 ATI Technologies
 1   0 ATI Technologies Inc`.
 1   0 Battle`.net
 1   0 Blizzard Entertainment
................
MSH>

Another super thing for testing purposes is the (what if) switch: 
MSH> get-process w* | stop-process –whatif
What if: Operation "stop-process" on Target "wdfmgr (772)"
What if: Operation "stop-process" on Target "winlogon (984)"
What if: Operation "stop-process" on Target "WINWORD (3504)"
What if: Operation "stop-process" on Target "WLTRAY (2808)"
What if: Operation "stop-process" on Target "WLTRYSVC (1888)"
MSH>

The (what if) switch will not perform the action, it will only show you what will happen!
In this case it would kill 4 processes

Accessing WMI objects is quite simple and logical:
MSH> $Bios = get-WMIObject Win32_Bios
MSH> $Bios.Name
Phoenix ROM BIOS PLUS Version 3.50 B03
MSH>

You can as many new drives as you want:
MSH> New-Drive Movies FileSystem \\FileSrv\Media\Movies
MSH> cd Movies:
MSH> dir

You can interact with system processes as well:
MSH> $a = Get-Process | where {$_.ProcessName -eq "notepad"}
MSH> $a.Kill()

Well that is it for now I will post some more info later.

 

I finally got my hands on MSH
Wednesday, July 13, 2005 10:22 AM

I am going to keep this short and sweet, MSH kicks ass.

 

Most shells (such as Windows CMD.EXE and the UNIX shells SH, KSH, CSH, and BASH) operate by executing a command or utility in a new process, and presenting the results (or errors) to the user as text.  Text-based processing is the way in which system interaction is done with these shells.  Over the years, a large number of text processing utilities—such as sed, awk, and PERL—have evolved to support this interaction.  The heritage of this operational process is very rich.

These shells also have another type of command; these commands are built-in to the shell and do not start a new process, but run within the process context of the shell.  Examples of built-in commands are the KSH typeset command and the CMD.EXE DIR command. In most shells the number of built-in commands is somewhat small, so over time a large number of utilities that have been created.

The MSH.EXE shell is very different from these traditional shells.   First, this shell does not use text as the basis for interaction with the system, but uses an object model based on the .NET platform.   As we will see, this provides a much different way to interact with the system.  Second, the list of built-in commands is much longer; this is done to ensure that the interaction with the object model is accomplished with the highest regard to integrity with respect to interacting with the system.  Third, the shell provides consistency with regard to interacting with built-in commands through the use of a single parser, rather than relying on each command to create its own parser for parameters.

Later in this document we will discuss how to interact with traditional executables and how they can more fully participate in an object model environment.

 

Some cool things that one can do with MSH.

 

MSH> $a = Get-Process | where {$_.ProcessName –eq “notepad”}

MSH> $a.Kill()

 

This will kill notepad if it is running.

 

You can browse through the registry like a file system and lots more.

 

I have only been playing with it for the last 30 minutes, when I have some more cool things to show, I will post.

The power of WMI with the .Net Framework
Thursday, May 26, 2005 11:57 AM

Many developers are not familiar with WMI and therefore don’t make use of this powerful technology. WMI stands for Windows Management Instrumentation. WMI core is already a part of windows ME/2000 and XP.

The purpose of WMI is to provide a standardized means for managing your computer system, be it a local computer or all the computers in an enterprise. In its simplest term, management is little more than the collecting of data about the state of a managed object on a computer system and altering that by changing the data stored about the object. A managed object can be a hardware entity such as a memory array, port, or disk drive. It can also be a software entity, such as a service, user account, or page file.

In managing a hard disk, you can use WMI to monitor the amount of free space remaining on the disk. You could also use WMI to remotely alter the state of the drive by deleting files, changing file security, partitioning or formatting the drive. Using the WMI framework, you can create a management application that monitors an enterprise, provides event-based alerts, and allows a user to control different aspects of the enterprise.

Inside the management namespace

ManagementObject
The ManagementObject class represents a data management object, which is an instance of a management class from the Common Information Model. ManagementObject is derived from ManagementBaseObject, therefore it allows access to the Properties and Qualifiers Collections. Additional information contained in this class are the Scope (where you are connected and which credentials are you using), the connection Options, and a few others. Some very interesting parts of the ManagementObject are the public methods Get, Put, and InvokeMethod, which you use to bind to the management object, to save changes, and to invoke methods of the object. You can also access associated management objects (e.g., users are associated with groups) with the two public methods GetRelated and GetRealtionship.

ManagementObjectCollection
The ManagementObjectCollection represents different collections of WMI instances like management objects, namespaces, scopes, and query watcher. You use this class to enumerate instances of management classes. For example, one management class represents a Windows service but many instances of the class can exist. For each service installed on your machine, there is one management object of type Win32_Service. You will obtain this collection of running instances from your management class to obtain the details of all services installed on your machine.

ManagementClass
The ManagementClass is derived from ManagementObject, and it represents a management class from the Common Information Model. You can use this class to obtain all instances of ManagementObjects in a ManagementObjectCollection by calling the GetInstances method or to create new instances by calling the CreateInstance Method. It also contains a property Methods, which gets or sets a collection of MethodData objects that represent the methods defined in the WMI class.

The System.Management namespace contains many more classes, but they are far beyond the scope of this article. For further information take a look at the MSDN Library.

Enter the code

Now that we know more about WMI and its implementation in the .NET Framework, we can write our first sample application.

You will need to add System.Managment as a reference (right click the references folder under your solution in VS and select System.Managment under the .NET tab).

using System.Management;

 

We will now use WMI to retrieve the Processors ID.


string cpuInfo =  "";

ManagementClass mc = new ManagementClass("Win32_Processor");

ManagementObjectCollection moc = mc.GetInstances();

 

foreach(ManagementObject mo in moc)

{

cpuInfo += "CPU ID - " + mo.Properties["ProcessorId"].Value.ToString() + "\n";

            cpuInfo += "CPU Load - " + mo.Properties["LoadPercentage"].Value.ToString() + "%" + "\n";

            cpuInfo += "L2 Cache - " + mo.Properties["L2CacheSize"].Value.ToString() + "KB" + "\n";

}

 

We can use the Management Object Searcher to access the WMI information as well; it uses WQL query’s to obtain the appropriate information.

 

//string to store Drive info

string sDriveInfo = "";

 

//Option for the connection

ConnectionOptions co = new ConnectionOptions();

 

//You must supply as valid username and password for the remote computer

 

co.Username = "Admin";

co.Password = "123";

 

//The scope to use

ManagementScope ms = new ManagementScope("\\\\" + sComputer + "\\root\\cimv2", co);

 

//get drive collection

ObjectQuery oq = new ObjectQuery("Select * From Win32_LogicalDisk where DriveType = '3'");


ManagementObjectSearcher mos = new ManagementObjectSearcher(ms,oq);

ManagementObjectCollection moc = mos.Get();

//loop through each object to get drive information

foreach(ManagementObject mo in moc)

{

            sDriveInfo += "Drive " + mo["Name"].ToString();

}

Conclusion

Well, that's it. Hopefully, this will encourage you to drill down into the WMI technology and take advantage of it. The WMI has so much information in it that the uses for it are almost limitless from performance monitors to hardware detection and custom editors.

 

Download: Source Code

SA Dev rocks, its alive! :-)
Thursday, April 14, 2005 9:02 AM

Well I am glad to see that there where people that was not happy with what I posted a couple of days ago, and this is a good thing. Well I supposed I could have worded it a bit better, but nerveless it achieved the goal that it was suppose to, that is to get people excited about SA Dev again. There where a lot of good things that came from it, there are now more people on the project, there was light put on some issues with the current setup, and plans of how to solve it.

 

So thanks goes out to all of the people that replied on the previous post and to those of you that are going to help out on the project.

 

Remember, SA Dev is a great community that will never die

by deon | with no comments
I am disappointed in SA Dev
Tuesday, April 12, 2005 1:05 PM

SA Dev was a very big and active community at a stage, but now it seems as if SA Dev is dead. I am very disappointed, there are allot of developers that say that they are having it very hard at the moment, then there are the ones that says it is so hard to find a job. Now tell me, how are you supposed to get a job or a better your position if you don’t get better exposure or more experience.

 

There is a brilliant opportunity open to all developers to work long side some of South Africa’s top MVP’s and not one developer responded to Ruari’s post on this site. I don’t wont to hear the excuse from a developer that they are not good enough to work along side MVP’s, or you are afraid what people might think of there code. This is a great opportunity to get your name out there and get recognition for your work. Doing project’s like this can help you a lot in getting a job or bettering your current position.

 

Here is the link to Ruari’s post http://www.sadeveloper.net/Forums/ShowPost.aspx?PostID=57880

Windows XP reg tweaks
Friday, April 08, 2005 10:46 AM

Here are some reg tweaks for windows will make your life better.

;-------------------------------------------------
;Disable Automatic Restart in the event of a BSOD
;-------------------------------------------------

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]
"AutoReboot"=dword:00000000

;-----------------------------------
;Disable the Desktop Cleanup Wizard
;-----------------------------------

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\CleanupWiz]
"NoRun"=dword:00000001

;-------------------------
;Disables Error Reporting
;-------------------------

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PCHealth\ErrorReporting]
"DoReport"=dword:00000000

;-----------------------------------
;Disables Windows Tour bubble popup
;-----------------------------------

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Applets\Tour]
"RunCount"=dword:00000000

;---------------------------------
;Disable Imapi CD-Burning Service
;---------------------------------

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImapiService]
"Start"=dword:00000004

;--------------------------------
;Disable Remote Registry Service
;--------------------------------

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RemoteRegistry]
"Start"=dword:00000004

;-----------------------------
;Disable Windows Time Service
;-----------------------------

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time]
"Start"=dword:00000004

;------------------------------------------------------------------
;This will add "Services" to the right-click menu of "My Computer"
;------------------------------------------------------------------

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\services]
@=hex(2):53,00,65,00,72,00,76,00,69,00,63,00,65,00,73,00,00,00
"SuppressionPolicy"=dword:4000003c
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\services\command]
@=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,00,73, 00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,63,00,2e,00,65,00,78,00, 65,00,20,00,2f,00,73,00,20,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52, 00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00, 32,00,5c,00,73,00,65,00,72,00,76,00,69,00,63,00,65,00,73,00,2e,00,6d,00,73, 00,63,00,20,00,2f,00,73,00,00,00

;-----------------------------------------------------------------------------
;This adds the "Open Command Prompt Here" on the right click menu for folders
;-----------------------------------------------------------------------------

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="Open Command Prompt Here"
[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /k \"cd %L\""
[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="Open Command Prompt Here"
[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="cmd.exe /k \"cd %L\""

;------------------------
;Remove Shared Documents
;------------------------

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031a47-3f72-44a7-89c5-5595fe6b30ee}]

;--------------------
;No Recent Docs menu
;--------------------

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoRecentDocsMenu"=dword:00000001

;------------------------------
;Allow renaming of Recycle Bin
;------------------------------

[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder]
"Attributes"=hex:50,01,00,20
"CallForAttributes"=dword:00000000

;-------------------------
;No Low Disk Space Checks
;-------------------------

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoLowDiskSpaceChecks"=dword:00000001

;----------------------------------------------------
;Max your Internet Explorer's simultaneous downloads
;----------------------------------------------------

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"MaxConnectionsPer1_0Server"=dword:0000000a
"MaxConnectionsPerServer"=dword:0000000a

;-------------------------------------
;Removes Sign up with Passport Wizard
;-------------------------------------

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Passport]
"RegistrationCompleted"=dword:00000001

;---------------------------------------
;Disables Preview of Movie file formats
;---------------------------------------

[-HKEY_CLASSES_ROOT\.avi\ShellEx]
[-HKEY_CLASSES_ROOT\.mpg\ShellEx]
[-HKEY_CLASSES_ROOT\.mpe\ShellEx]
[-HKEY_CLASSES_ROOT\.mpeg\ShellEx]

;-------------
;Copy To Menu
;-------------

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Copy To]
@="{C2FBB630-2971-11D1-A18C-00C04FD75D13}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Move To]
@="{C2FBB631-2971-11D1-A18C-00C04FD75D13}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AllFilesystemObjects\shellex\ContextMenuHandlers\Send To]
@="{7BA4C740-9E81-11CF-99D3-00AA004AE837}"

;-------------------------------------------------------------------
;This adds the "Register DLL" on the right click menu for DLL files
;-------------------------------------------------------------------

[HKEY_CLASSES_ROOT\dllfile\shell]

[HKEY_CLASSES_ROOT\dllfile\shell\Register DLL]

[HKEY_CLASSES_ROOT\dllfile\shell\Register DLL\command]
@="C:\\WINDOWS\\system32\\regsvr32.exe %1"

;-----------------------------------------------------------------
;Makes a right click option for unknown files (Open with notepad)
;-----------------------------------------------------------------

[HKEY_CLASSES_ROOT\*\shell]
@="\"notepad.exe %1\""

[HKEY_CLASSES_ROOT\*\shell\open]
@="Open With Notepad"

[HKEY_CLASSES_ROOT\*\shell\open\command]
@="notepad.exe %1"

;--------------
;GDI+ Tool fix
;--------------

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\GdiDetectionTool]
"GDITool"=dword:00000001

;-------------------------------------------
;Disable windows built in zip functionality
;-------------------------------------------

[-HKEY_CLASSES_ROOT\.zip\CompressedFolder]
[-HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CompressedFolder]

;-------------------------------
;Remove WMP Right Click Options
;-------------------------------

[-HKEY_CLASSES_ROOT\CLSID\{F1B9284F-E9DC-4e68-9D7E-42362A59F0FD}]
[-HKEY_CLASSES_ROOT\CLSID\{8DD448E6-C188-4aed-AF92-44956194EB1F}]
[-HKEY_CLASSES_ROOT\CLSID\{CE3FB1D1-02AE-4a5f-A6E9-D9F1B4073E6C}]

;-----------------------------------------------------------------------
;Gets rid of anoying popup for running files you download from internet
;-----------------------------------------------------------------------

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Download]
"CheckExeSignatures"="no"
"RunInvalidSignatures"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments]
"SaveZoneInformation"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations]
"LowRiskFileTypes"=".zip;.rar;.nfo;.txt;.exe;.bat;.com;.cmd;.reg;.msi;.htm;.html;.gif;.bmp;.jpg;.avi;.mpg;.mpeg;.mov;.mp3;.m3u;.wav;"

;-----------------------------------------------
;Adds Device Manager right click of MY Computer
;-----------------------------------------------

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\DevMgr]
@="Device Manager"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\DevMgr\command]
@="mmc.exe C:\\WINDOWS\\SYSTEM32\\devmgmt.msc"

;---------------------
;Removes Language Bar
;---------------------

[-HKEY_CLASSES_ROOT\CLSID\{540D8A8B-1C3F-4E32-8132-530F6A502090}]
@="Language bar"
"MenuTextPUI"="@%SystemRoot%\System32\msutb.dll,-325"

;-----------------------------
;Opens nfo files with Notepad
;-----------------------------

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo]
"Application"="NOTEPAD.EXE"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo\OpenWithList]
"a"="Explorer.exe"
"MRUList"="ba"
"b"="NOTEPAD.EXE"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo\OpenWithProgids]
"MSInfo.Document"=hex(0):

;--------------------------------------------------------
;Removes Briefcase, and Rich-Text-Document from New Menu
;--------------------------------------------------------

[-HKEY_CLASSES_ROOT\.bfc\ShellNew]
[-HKEY_CLASSES_ROOT\.rtf\ShellNew]
[-HKEY_CLASSES_ROOT\.bmp\ShellNew]
[-HKEY_CLASSES_ROOT\.wav\ShellNew]
[-HKEY_CLASSES_ROOT\.zip\CompressedFolder\ShellNew]

;------------------
;Register FlashGet
;------------------

[HKEY_CURRENT_USER\Software\JetCar\JetCar\General]
"RegName"="
slain@deviance.dev"
"RegPass"="YOUR SERIAL"
"RegDisp"="slain"

;--------------
;Register Nero
;--------------

[HKEY_LOCAL_MACHINE\SOFTWARE\ahead\Nero - Burning Rom\Info]
"User"="Slain"
"Company"="Deviance"
"Serial6"="YOUR SERIAL"

[HKEY_LOCAL_MACHINE\SOFTWARE\ahead\Plug-ins\Nero Digital Universal\Info]
"Serial6"="YOUR SERIAL"

How to slipstream SP1 for .Net 1.1
Thursday, April 07, 2005 7:35 PM

Hey all, have you ever wanted the .Net Framework, SP1 and the ASP Patch all in one package. Here are the steps you can follow to use Windows Installer command line tool to create an installable package that includes the .NET Framework, Service Pack 1 and the ASP patch.

1.) Download the .NET Framework 1.1

2.) Extract the contents of the .NET Framework to a folder - you can do this by
     running dotnetfx.exe /t:c:\temp /c

3.) Download the .NET Framework 1.1 SP1

4.) Extract the service pack MSP package to a folder by running
     NDP1.1sp1-KB867460-X86.exe /Xp:c:\temp\sp1.msp

5.) Download the ASP Patch to SP1

6.) Extract the ASP Patch MSP package to a folder by running
     NDP1.1sp1-KB886903-X86.exe /Xp:c:\temp\asp.msp
.

7.) Run msiexec.exe /a c:\temp\netfx.msi TARGETDIR=c:\temp\netfx

8.) Run msiexec /p c:\temp\sp1.msp /a c:\temp\netfx\netfx.msi

9.) Run msiexec /p c:\temp\asp.msp /a c:\temp\netfx\netfx.msi

You have now created a new netfx.msi, in c:\temp\netfx. You can now run your setup from this folder or you could take all of the contents of c:\temp\netfx, and compress it into a SFX archive. In the SFX archive options set the extraction to silent and run netfx.msi /qb after extraction.

Enjoy.

Decrypting a resource at runtime
Thursday, March 24, 2005 1:46 PM

Hi every one, there will be a time where you want to embed an encrypted resource. Here is how you will decrypt that resource and pass a normal stream to your app. What you must do is encrypt your resource (take a look at Symmetric Key Encryption using Rijndael and C# ) and then and it to your application as an embedded resource. Then all what you must do next is call “DecryptEmbedded“ to get the decrypted stream which you can then use in your app.

private Stream DecryptEmbedded(string sResource, string sPwd)
{
        Stream streamIn = null
;
        Stream streamOut = new
MemoryStream();

        Assembly asm = Assembly.GetExecutingAssembly();

        streamIn = asm.GetManifestResourceStream(sResource);

        RijndaelManaged RijndaelCipher = new RijndaelManaged();

        byte[] Salt = Encoding.ASCII.GetBytes(sPwd.Length.ToString());

        PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(sPwd, Salt);

        ICryptoTransform Decryptor = RijndaelCipher.CreateDecryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
        CryptoStream cryptoStream =
new CryptoStream(streamIn, Decryptor, CryptoStreamMode.Read);

        int ByteData;
        while
((ByteData=cryptoStream.ReadByte()) != -1)
        {
                streamOut.WriteByte((byte
)ByteData);
        }

        streamIn.Close();
        cryptoStream.Close();

        return streamOut;
}

by deon | with no comments
Encrypting and Decrypting data with DPAPI
Wednesday, February 09, 2005 5:15 PM

Creating secure applications is more important today than ever before. Most distributed applications need some form of cryptography to protect your secrets from snooping eyes whether they're hackers, users, or even your own DBA. The .NET Framework makes it easy to encrypt and decrypt data.  It provides a number of cryptography algorithms.  Each works by encrypting or decrypting data using a password or key. The password or key itself must be secured and protected in a way that only allows your application to access it.

 

Starting with Windows 2000, Microsoft began including an API to perform application-level encryption and decryption of data, this API is called Data Protection API or DPAPI. The DPAPI is used to hide secrets like connection strings and user credentials that are typically stored in a config file or in plain text. DPAPI uses a specifically strong cryptographic algorithm called Triple-DES and strong keys. You can use it to encrypt and decrypt your sensitive data at a machine or user specific level. DPAPI uses either a key derived from the machine or the currently logged-on user. The key can be optionally augmented with an application-specific secret key referred to as secondary entropy. As you can imagine, the benefits of using the DPAPI are not only that applications get a strong encryption algorithm but also that they don't have to handle, protect, or remember the secret key value.

 

The user profile approach affords an additional layer of security because it limits who can access the secret. Only the user who encrypts the data can decrypt the data.

 

The machine store approach is easier to develop because it does not require user profile management. However, unless an additional entropy parameter is used, it is less secure because any user on the computer can decrypt data. (Entropy is a random value designed to make deciphering the secret more difficult.) The problem with using an additional entropy parameter is that this must be securely stored by the application, which presents another key management issue.

 

Overall, DPAPI is a very easy-to-use service that will benefit developers that must provide protection for sensitive application data, such as passwords and private keys.

 

Below is the link to the class library that I created, that wrapps the DPAPI, and a demo application, showing how to use it. There is a link to SA Dev, that has my complete artical and source code.

 

Download: DPAPI .Net

Link: SA Dev

by deon | with no comments
SA Dev coding session
Thursday, February 03, 2005 10:43 AM

The idea is that we all come together to learn how to code something new together, the topic that I chose for the project is a media player. I will be giving out the base source code, at the meeting, then we all can improve on it at the same time, it is going to be lots of fun, with some spot prizes for the must funniest interface, most unorganized code, (that is correct, a prize for the most unorganized code), fewest line, least functional, most functional and lots more. The whole idea is to have a very fun and interactive SA Dev meeting.


Title: SA Dev coding session
When: 19 February 2005 
Location:
Microsoft’s Office
Time:
10:30 am
RSVP:
Please RSVP to slain@mailbox.co.za by 16 February 2005.
Requirements: Those of you that are going to attend in the coding session will have to bring there own pc or laptop, with vs.net installed already.

The presentation will be delivered by Deon Spengler and Rudolf Henning.

There won’t be any food supplied, we will have to get our own food, at some point during the coding session. I will try and organize some free Red Bull for the even though.

For those that can’t bring there pc or laptop, you are welcomed to come and check the coding session out, you might even learn something. :-)

I hope to see you all there.

by deon | with no comments
What a blog is and what it is not.
Wednesday, January 26, 2005 11:28 AM

A definition of a  blog, a blog is basically a journal that is available on the web. The activity of updating a blog is "blogging" and someone who keeps a blog is a "blogger." Blogs are typically updated daily using software that allows people with little or no technical background to update and maintain the blog. Postings on a blog are almost always arranged in chronological order with the most recent additions featured most prominently.

Now that we got that out of the way, I can continue. When most of us started to blog we did not really what a blog ment, there where some people that started using it as a webpage, and others regurgitated new posts from other web sites. I am guilty in the latter, but once I understood that a blog was ment to be, a journal of ones like and not a news site, blogging made more sense to me.

Now it is important that we use a blog for what it is ment for, or else it will spoil the scene for other people, for me personally I am tired of seeing new articles being regurgitated from sites like neowin.net and msfn.org, on dotnet.org.za. Dotnet.org.za is a blog not a place to steal news post from other sites and post it here, don’t get me wrong, the odd article from another site is fine, but there are a few members here that continuously repost other peoples articles here as there own. This must stop, if I want to read about the latest news, I will go to neowin.net or msfn.org and read the original article there. Dotnet.org.za is a blog mostly for developers, and when I come to this blog I am interested in what development work has been done by these developers and what interesting stuff has happened in there lives, I don’t what to reread something on dotnet.org.za that I have already read on neowin.

If you go the http://dotnet.org.za and you start reading though all the blogs, you will soon see that most of the content is with in lines of a blog, and in the development realm. There is only one or two people that don’t get what a blog is.

I know that some people might have hard feelings towards what I have written here, if so voice them in the comments, and we can see how things go from there.

Enjoy the rest of your day.

Some new stuff
Monday, December 27, 2004 12:22 AM

Hi all, if you go to my Image Galleries then to Case mods, you will see some pics of my new heat sink and mouse pad.

Link: Images

by deon | with no comments
Paint.NET v2.0
Wednesday, December 22, 2004 12:32 AM

Paint.NET is image and photo manipulation software designed to be used on computers that run Windows XP. Paint.NET is jointly developed at Washington State University with additional help from Microsoft, and is meant to be a free replacement for the MS Paint software that comes with all Windows operating systems. The programming language used to create Paint.NET is C#, with GDI+ extensions.

Paint.NET has many of the powerful features that expensive commercial applications have, including the ability to use layers. This is the second semester that Paint.NET has been a project at Washington State University, and we have the goal of adding as much functionality as expensive commercial applications provide, but of course, for free! In the spirit of all this freedom, we welcome any suggestions, as well as provide the source code free of charge for anyone who wishes to tinker with it.

Link: Paint.NET

More Posts Next page »