Scanex

About this project
Scans executable images for their properties and attributes.
Wiki / Home

Author's Overview Notes...

Scanex is Windows WPF desktop utility which scans the file system for executable images (*.dll and *.exe by default) and extracts native and .NET managed header and metadata information from the files and displays the results in a grid. The information that is collected includes versions, descriptions, comments, public keys, signatures, and a lot more.

I wrote Scanex to help me perform the following tasks:

  • Find accidentally mixed versions of the same file.
  • Compare the attributes of suites of files to ensure they contain consistent information.
  • Look for files that are missing strong names or digital signatures.
  • Locate 'foreign' files mixed with personal files.

The grid display provides a convenient way of browsing large amounts of information to seek inconsistencies. I found Scanex so useful that I've made it a public repository just in case other developers find it useful. There are many text fields which can be used to quick filter the grid by a variety of criteria.

The original version of scanex ran the scan processing in a separate AppDomain which was unloaded after the scan finished to relieve memory pressure due to the large number of libraries that could be loaded due to the calls to Assembly.LoadFile .

The AppDomain was deprecated in .NET Core and later, so the latest version of scanex has moved the scan processing into a child Process which only exists for the duration of the scan.

The MixedComms library NuGet package is used to perform duplex communication between the parent app Process and the child Process which performs the scan. The parent sends an XML fragment with the scan parameters to the child which runs the scan, sends progress feedback messages via redirected stdout and finally serializes the scan results into a temporary file. When the child Process ends, the parent can read and delete the file and display the results in a grid.

The app currently targets .NET Framework 4.8, so it could continue to use an AppDomain, but as a learning and technical exercise it was migrated to use a Process.

Screen Shot

Orthogonal Programming Link