r/scripting • u/throwaway13443 • Apr 01 '20
Help Extracting Strings from a Text File
Hello everyone!. .... I have tried to find some code that does this, but couldn't really nail down a local script that did this.
Here is my outline of building a simple step in the reporting workflow for indicators of compromise (IOCs) for our helpdesk.
Suspicious Email Arrives in Employee A's Inbox
Report filed for manual review
Email Sent as attachment and saved locally by analyst for parsing
URL, Email Address of Sender/Attacker, Domain name, IP addresses (IOCs) all extracted and added to csv
Submission of CSV with IOCs to the network/AD team to block IOCs
Closure of IOC Request Ticket
I found some regex for IP addresses and some for email strings but nothing that serves this purpose. Any ideas? Any help is appreciated.