Open-AudIT https://www.open-audit.org/phpBB3/ |
|
Incorrect email attachment path in audit.vbs https://www.open-audit.org/phpBB3/viewtopic.php?f=8&t=4415 |
Page 1 of 1 |
Author: | smorloc [ Thu Feb 24, 2011 9:43 am ] |
Post subject: | Incorrect email attachment path in audit.vbs |
I believe that the generated path for the email attachment in audit.vbs is not correct. In the following code, I beleive that "this_audit_log" already has a path on it. Adding another pass leads to an SMTP error: [code] if use_audit_log = "y" then Set objShell = WScript.CreateObject("WScript.Shell") this_folder = objShell.CurrentDirectory this_file = this_folder & "\" & this_audit_log end if [/code] The code should probably read: [code] if use_audit_log = "y" then this_file = this_audit_log end if [/code] Or better still, the if/then bock could be eliminated and the single reference to "this_file" be replaced with "this_audit_log" later in the method: [code] if use_audit_log = "y" then objEmail.AddAttachment this_file end if [/code] Regards, Steve |
Page 1 of 1 | All times are UTC + 10 hours |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |