How would you advise reading a csv for MD5 hash matches from a list of hashes?

I would like to send an email with a csv attached and have icon check it for matches from a list of md5 hashes.

read email > csv to json > pattern match?

@hayden_redd You don’t have to convert the CSV to JSON, you can pass it directly to the ExtractIt step or the Pattern Match step to pull out the MD5 data (assuming there’s more than MD5’s in it) from the CSV, and then you could run the Grep plugin to match against the list you want to check them against. Depending on the format, you will likely want to compare array of the MD5s from the CSV against an array of your list of MD5 hashes. Utility plugins like String and Type Convertor may help get that data into the correct format.

We also have CSV plugin if you want to get more granular with the CSV data and pull out specific columns for extraction, say for example, there’s multiple columns and column 5 has the MD5s. In this case, it’s better to just grab the column than regex across them with Pattern Match or ExtractIt.

why do I keep getting

UnicodeDecodeError: ‘utf-8’ codec can’t decode bytes in position 15-16: invalid continuation byte

when im using the Filter Bytes action from the csv plugin

what is the right input to use here?

{{[“new email”].[icon_email].[flattened_attached_files].[0].[content]}}

What’s the value for:
{{[“new email”].[icon_email].[flattened_attached_files].[0].[content_type]}}

I’ve seen various email servers do strange things with attachments.


it was an .xlsx ugh, trying now as an actual csv ha

1 Like

Heh, I’ve done that. What keyed me off was the line 15-16 comment. If something is going to fail to decode it usually does it in the 1st or 2nd character.

1 Like

We shipped a new action to the Type Converter plugin called Array Match that will help with use-cases like this where you have two lists (arrays) and want to find matches between them e.g. MD5 hash in one list is also present in another.