Wednesday, January 28, 2004 - Posts

Retrieve informations about files and DLL

This is a routine that I've written and used today for a simple task: retrieve informations about files and DLL for a certain path on a machine. It seems working good.

using System;

using System.Diagnostics;

using System.IO;

namespace InfoDLL

{

// Get information about a file on the local machine

class FileGetInfo

{

static void Main()

{

FileVersionInfo fversinfo;

FileInfo finfo;

string filepath;

//Declare an absolute path to a file to retrieve information about

filepath = "c:\\winnt\\system32\\wininet.dll";

//Ensure file exists

if (File.Exists(filepath))

{

//Get Version information

fversinfo = FileVersionInfo.GetVersionInfo(filepath);

//Print file description

Console.WriteLine(fversinfo.FileDescription);

//Print full Path to file

Console.WriteLine(

"\tfullpath : {0}",

fversinfo.FileName

);

//Print Major.Minor version info

Console.WriteLine(

"\tversion : {0}.{1}",

fversinfo.FileMajorPart,

fversinfo.FileMinorPart

);

//Cleanup

fversinfo = null;

 

//Get general file informations

finfo = new FileInfo(filepath);

//Get file attributes

Console.WriteLine(

"\tattributes: {0}",

finfo.Attributes.ToString()

);

//Get the size of the file

Console.WriteLine(

"\tfile size : {0}k",

finfo.Length/1024

);

//Get the last time the file was written to

Console.WriteLine(

"\tlast write: {0}",

finfo.LastWriteTime.ToShortDateString()

);

//Cleanup

finfo = null;

}

}

}

}

New Explorer Hole

A security hole in Microsoft Internet Explorer could prove devastating. Following the exposure of a vulnerability in Windows XP earlier this week, “http-equiv” of Malware has revealed that Explorer 6 users (and possibly users of earlier versions) could be fooled into downloading what look like safe files but are in fact whatever the author wishes them to be -- including executables.

A demonstration of the hole is currently on security company Secunia’s website and demonstrates that if you click on a link, and select “Open” it purports to be downloading a pdf file whereas in fact it is an HTML executable file.

It is therefore only a matter of imagination in getting people to freely download what could be an extremely dangerous worm -- like, for instance, the Doom worm currently reeking havoc across the globe.

However what is more worrying is that this hole could easily be combined with another Explorer spoofing problem discovered in December.

The previous spoofing problem allowed Explorer users to think they were visiting one site when in fact they were visiting somewhere entirely different. The implications are not only troublesome, but Microsoft’s failure to include a fix for the problem in its January patches has led many to believe it cannot be prevented.

Make attention!

SOAP Toolkit will be deprecated

The Microsoft SOAP Toolkit is deprecated by the .NET Framework. The toolkit provides basic Web services capabilities for COM components and applications. SOAP Toolkit support will be retired on July 1, 2004.

Why this choice? SOAP Toolkit was a valid solution for consuming Web Services with VB6 or ASP applications. Is it a good choice?

However, this is an interesting article on how to access a Web service from both Microsoft Visual Basic 6.0 and Visual Basic .NET, and how to convert your existing SOAP applications to the Microsoft .NET platform:

New Software Upfate for Internet Explorer will arrive soon... make attention!

Microsoft plans to release a software update that removes support for handling user names and passwords in HTTP and HTTP with Secure Sockets Layer (SSL) or HTTPS URLs in Microsoft Internet Explorer. The following URL syntax is no longer supported in Internet Explorer or Windows Explorer after you install this software update:

http(s)://username:password@server/resource.ext

You can find more informations about this update HERE.

PocketFeed v.06 Alpha

PocketFeed is an RSS/RDF news aggregator that runs on the Pocket PC 2002/2003 PDA's. Using OPML for it's blogroll, you can now take your news, blog entries, or any other type of syndicated data with you, sync it wirelessly or read it offline.

Download: Latest version and source available on GotDotNet.

PocketFeed  PocketFeed

KOffice 1.3 Released

Today, the KDE Project released KOffice 1.3 for Linux and Unix operating systems. Big improvements have been made in KOffice 1.3 with respect to interoperability with other office file formats. It is now for example possible to import as well as export OpenOffice.org documents. Also new is the ability to import PDF files into KWord and make changes to the document. Support for Microsoft document- formats has improved as well.