Emunge is a very simple program designed to take a piece of text from the clipboard or entered into the program's left window pane and perform a series of regular expression search and replace operations, producing the output text in the other window pane.

The program was created primarily for the processing of spam emails that are intended to be sent to an ISP's abuse desk or to be published in some public forum, but it could be used for any number of other associated tasks. Whilst most ISP abuse departments can be trusted not to harvest or otherwise misuse any identifying items contained within the submitted email, some are not so trustworthy. In addition, if you wanted to post the spam sample in a newsgroup for example, you probably wouldn't want your email address or any other recognizable information showing. Hence, this program can be used to remove or "munge" words in the email to prevent further leakage of personally identifiable data.

Emunge in written in C# using Windows Forms and so requires the Microsoft .NET framework. It is quite likely that you already have this installed so try Emunge first to see if it works before downloading the huge .NET framework.


How to use it


Place the text you want to process into the left window pane. You can paste text from the clipboard into the left pane by clicking the Paste button. Press the Process button to apply the filters. To copy the results seen in the right pane click the Copy button. To perform all of the actions of clearing the left pane, pasting in text from the clipboard, processing the text and displaying and copying the results back out to the clipboard you can press the All button.

When Emunge starts, if it recognizes an email on the clipboard it will automatically perform all of the actions to clear and paste the text in the left pane, process the text, place the transformed text into the right window pane and copy these results back to the clipboard.

Clicking the Filters button open up the filters dialog. This is where you enter search regular expression filters and replacement text. For every search expression that matches some text, that text will be replaced with the specified replacement text. For example, searching for "abc\d+" and setting it to be replaced with "abcNUMBERS" would find all text starting with "abc" followed by one or more digits and replace it with "abcNUMBERS". If you simply want to remove the matched text altogether don't enter anything in the replacement text field.

The regular expression engine used by this program is part of the Microsoft .NET Framework, and like all things Microsoft is a little different to the rest of the world :-) Many Perl compatible regexes will work with little or no change but to fully understand some of the differences and extensions that the Microsoft engine supports you should read the syntax at Microsoft's website.

Filters are saved in the file "filters.dat" file in the same directory as the program. Emunge comes with a ready built "filters.dat" file with some useful example filters for email munging already defined.


Disclaimer!


I have a healthy disdain for bloated software with unnecessary dependencies. However, I decided to release this program, with its dependency on the .NET framework and written in a programming language that I have never used before purely because it was so easy to create and was an interesting exercise because the language was something new and different for me. I'm sure it could be written better but this my my very first C#/forms program. I have no plans for creating any more C# applications in the near future, but I have to say that the whole Microsoft C# and Windows Forms development environment was really quite nice to use! This program was created in considerably less time than it would have taken if I'd programmed in pure C++ and the Windows API. With that said, if you despise C# and hate the thought of the massive .NET framework then I perfectly understand -- just ignore this program and pretend I never wrote it :-)


Version 1.01
  • Fixed splitter bar problem.

Version 1.00
  • Initial release