Wow, what a year, and almost done already as well! Not only did I again not blog anything but a ton of stuff has happened, so I decided to make this little roundup of my journey through 2023, enjoy!
Late again
Alright, let’s start with the most obvious discrepancy: I missed the deadline for this article by a couple weeks because I procrastinated writing it. Ever since I switched to full-time software development my incentive to blog has taken a steep dive downwards (possibly because I already spend most of my time typing stuff?). Oh well, I got to it eventually in between everything that’s been happening 😅 I also took liberty to slip in topics that technically started happening in 2022 to fill more gaps and because consistency is not my forte 😬 With that out of the way: let’s go!
Created repositories
Let’s start with something light: a listing of newly birthed repositories and projects that I deem noteworthy and might be of interest to fellow developers. Most of them are class libraries written in C# and released under classic FOSS licenses like MIT or BSD-3-Clause. Listed from oldest to newest, bear in mind that some of them might still be in an early alpha stage or on hiatus until I have the time again to polish them up further.
January 2022
Legacinator
I’ve been collecting common reappearing issues from either my past craft or tools of my interest. Since most people nowadays are in a hurry and do not carry the patience to read documentation, I created a simple stand-alone .NET tool that can detect and fix common driver issues like outdated or incompatible components being present on the system with the click of a button. Give this tool a try if you have unexplained weirdness going on like Steam not being able to detect your favourite game controller and alike!
Nefarius.Utilities.DeviceManagement
Dealing with devices and driver tasks from .NET is a verbose and unpleasant experience. After many years of repeating myself I’ve finally decided to come up with this powerful class library containing utility classes for many unconventional device and driver management tasks, like:
- Listen for device plugin and unplug events without depending on WinForms or WPF
- Enumerate and remove elements from the Driver Store
- Convert various notations (Symlink to Instance ID etc.)
- Get and set various unified device properties
- Enumerate devices (present and absent)
- Hot-swap device function drivers
- Add/Remove/Clear class filters
- Power-cycle USB hub ports
- Install/update drivers
- Uninstall devices
It’s getting updated frequently and even works with legacy .NET Framework versions. You can use it to make your own driver installer utility or just listen for device arrival and departure events without having to drag in UI dependencies.
February 2022
IgorBot
Time is an incredibly valuable resource so I am personally quite unforgiving regarding any sort of spam. After operating and moderating a Discord community for roughly 7 years now, growth and popularity comes with the downside of sooner or later endig up on spammers’ radars. To combat self-bots and screen new members for some basic properties (like above-room-temperature IQ) I developed this onboarding bot which offers one or more questionnaires to newcomers and automatically removes those who do not comply from the server. I can’t recall a single moderation incident since it’s been implemented on my server, good bot! *pat* *pat*
April 2022
Nefarius.Drivers.WinUSB
This is a fork of a great wrapper library for using the WinUSB user-mode APIs from C#. The fork primarily upgraded the project to modern .NET paradigms and added features I required. There’s still a few open topics I’d like to modernise but overall it’s working great!
TrackPointDriver
This driver projects offers an alternative driver for TrackPoint devices on certain ThinkPad laptops. My involvement with the fork was merely some consulting and building and signing the release binaries so users do not need to dabble with test-mode.
June 2022
nefcon
I’ve finally had enough and made my own devcon
tool rewrite with sane command line arguments and offering both a console and a window-less execution mode that can be used in conjunction with setup makers. It also comes with a simple and clear MIT license that doesn’t stand in the way of redistribution of binaries, even in closed and commercial projects. Feel free to adopt and ditch devcon
for good!
AdvancedUpdaterGitHubProxy
When using the Advanced Installer Updater component, you either have to write the updater INI file by hand or use their UI tool. This little ASP.NET server project auto-generates AIU-compatible configuration from a given GitHub repository’s release information.
Nefarius.Utilities.GitHubUpdater
A simple utility library that uses GitHub releases to determine if your application is outdated.
August 2022
Nefarius.Utilities.SessionNotification
Ever had the need to get notified when the user locks the workstation or logged off? Preferably also working when run from a Windows service? That’s exactly what this .NET library offers!
September 2022
XInputPlayerToDevicePath
Quick-and-dirty proof-of-concept on how to use Win-API-hooking to sniff out the symbolic link path of the device that’s behind a particular XInput player slot. Not really production-ready since it got all sorts of issues like not being safe in a multi-threaded environment etc. but that’s what demos are for 😉
October 2022
Nefarius.Utilities.Bluetooth
This one’s a personal favourite of mine! Ever wondered how to turn on or off your Bluetooth host radio directly from code without dragging any weird Windows Runtime dependencies in? I’ve got you covered! Another part of it is a new and niche research topic: SDP record patching to hide wireless HID devices from games while still being able to access them from your own tools. A bit rough and unfinished around the edges but the public classes work fine in production.
Nefarius.Drivers.HidHide
Managed .NET library for accessing and altering HidHide configuration. Complete C# implementation, no trickery like calling the CLI process under the hood. Very simple and intuitive interface and documentation provided. Used in production for almost two years now and gets constantly refined through community bug reports.
November 2022
Nefarius.Utilities.NtDll
Another quick’n’dirty experimental library that needs some love and polish, however at its core it already provides C# utility classes to enumerate “NT-Objects”, which otherwise requires other tools like Process Explorer or WinObj by Sysinternals. Useful to find open handles like files in use or open sockets on Windows.
December 2022
Nefarius.Utilities.Registry
Another fork that got heavily mangled modified. Ever had the need to parse (relatively large) .reg
Registry export files in C#? Here you go, changes the fork introduced:
- Modernized code and style to latest C# language version
- Settled on .NET 7 to benefit from .NET regular expression source generators
-
RegFile
class can now parse from streams in addition to file paths - Added
RegValueType
forREG_DWORD
,REG_SZ
, … as a SmartEnum - Migrated strings to better suited types where applicable
- Migrated string processing to using Spans where applicable
- Greatly improved parsing speed and reduced memory footprint
- Added type-specific
RegValue
classes with pre-parsedValue
property in the expected managed type (string
,byte[]
, etc.)
January 2023
Nefarius.Utilities.AspNetCore
Another utility library birthed to cut down on code copy-paste throughout multiple web projects. This library is heavily opinionated and may not be to your liking, however can be heavily customized. It adjusts the default behaviour of ASP.NET Core projects to fit my common set of patterns: add logging using Serilog, configure known proxy networks for running the service on Docker or Kubernetes etc. Still grows constantly as my needs develop.
NuGetCachingProxy
Pulling in dependencies when building is as common as breathing nowadays. To take some load from the official NuGet servers and speed up CI jobs, this caching proxy project can be used, which stores the package binaries in a MongoDB instance. Still needs some love and get finished properly.
April 2023
Nefarius.Steam.PartnerWebApi
A very rough and incomplete REST API wrapper for the Steam Partner Web API using the fantastic Refit framework. Once I need more features I’ll get back to it and add them.
WinDbgSymbolsCachingProxy
Another personal favourite! When frequently analyzing crash dump file, you’ll twiddle your thumbs a lot waiting for WinDbg to fetch symbols from the Microsoft servers at delays higher than the worst mobile Internet connection I’ve ever witnessed. This caching proxy can be hosted locally and sits between WinDbg (or Visual Studio and other clients supporting NT_SYMBOLS) and the upstream Microsoft Symbol Servers and stores a copy of both found and missing symbols in a MongoDB instance. It made my life analyzing crash dumps a lot more enjoyable, as I can focus on finding bugs rather than swearing at the loading times 😄
Nefarius.Utilities.Assembly
Tiny utility library that reads the assembly file- and product-versions from the embedded Win32 version table resource rather than the assembly metadata.
EPPT
I had these sources collecting dust on my disk for a while and finally published it. Ever played an FPS and wondered why mouse aiming “doesn’t feel right”? Well, you may have “enhance pointer precision” a.k.a. “mouse acceleration” enabled, which distorts the distance feel of mouse movements at different speeds, depending on the input API the game uses. Also comes with optional autostart self-registration so you never need to worry about disabling this feature ever again!
August 2023
Nefarius.Utilities.HIDReportKit
This is something I wanted to start for years and sadly still do not have much time to nurture it and give it the attention it deserves. The goal of this .NET library is to provide up-to-date managed abstractions regarding game controller HID report input, output and feature reports. No more insane byte-juggling, just start using bloody properties already!
October 2023
vicius
This one I’m certainly most proud of! A solution created out of pure spite and hatred for all the pre-existing software updater solutions out there. After roughly 10 years of collecting experiences (and pain) I finally started to write my own software auto-updater tool from the grounds up. It supports a broad case of configuration constellations; from (almost) zero-config to maximum customizability, all in modern JSON and with a ton of documentation. I’m looking forward to integrating it into many of my own projects soon 🤩
November 2023
Nefarius.CsvHelper.Excel
Another fork! This refurbished library offers you a modern, simple to use Excel spreadsheet parser and writer. The upstream repositories were all abandoned so I stepped in and made sure dependencies are kept up to date and I will also fix the occasional breaking change. Could use some more love but for now the tower of duckt tape is working fine.
January 2024
Nefarius.HttpClient.LiteDbCache
And now for our youngest member I’m particularly proud of: an embedded database backed offline cache for web requests issued via HttpClient/IHttpClientFactory
! The need arose when working on a Windows WPF application consuming a couple web services which are technically not mission-critical to be always online. The library is designed in a way that requires almost zero code changes for the caller and offers customization like cache entry expiration and multiple database instances. Works fine with ASP.NET as well.
To be continued
Oh wow, would you look at the length of the article, I’ve underestimated this proposition once again so I’ll split this into parts or the article will be published in winter 2024 😃 ’till next time!