StringReplace sug/question

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

StringReplace sug/question

Post by JRL » Tue Aug 05, 2008 10:36 pm

A current email trojan, duped two of my co-workers and they installed it on their computers. They were infected before the virus detection folks had the malware on their radar so it was difficult to detect and uninstall. What that also meant was that this passed through virus detection undetected. The trojan arrives as a zipped executable file. I would like to be able to detect the arrival of zipped executable files into the company's email and deal with them through a personal visual inspection.

Using Macro Scheduler I have been able to successfully identify emails that contain attached zip files. The attached files arrive encoded in base64. I can isolate this text from the rest of the email message. I need to decode the base64 to be able to see what type of file is zipped. The problem is that the base64 attachment contains CRLFs every 75 characters that need to be removed. Importing a 500K file into Macro Scheduler and using Stringreplace> to convert the CRLFs to nul can be done but it takes about 60 seconds. Using the Separate> function then concating the text back together less the CRLFs takes about 80 seconds. On the other hand converting the CRLFs to nul using the VBScript "Replace" function in a VBscript outside of Macro Scheduler takes about 1 second. The problem I'm having is that if I try to pass text full of CRLFs to VBScript inside Macro Scheduler it fails with a "Microsoft VBScript compilation error :1033 Unterminated string constant." Using a slightly different technique discussed here I get the same error.

My question is this: Any chance that the Stringreplace> function can be modified to work faster much like the variable processing that was recently vastly improved?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts