diff --git a/README.md b/README.md index 3ad6834..8964ea6 100644 --- a/README.md +++ b/README.md @@ -1 +1,34 @@ # Workstation_USB_Monitor + +NAME: Workstation_USB_Monitor.vbs + +TYPE: Visual Basic Script + +PRIMARY LANGUAGE: VBS + +AUTHOR: Justin Grimes + +ORIGINAL VERSION DATE: 6/1/2018 + +CURRENT VERSION DATE: 2/19/2019 + +VERSION: v1.9 + +DESCRIPTION: +A simple script to be run on workstations that monitors for changes in disk drive configuration. + +PURPOSE: +To monitor company workstation storage devices for changes. + + +INSTALLATION INSTRUCTIONS: +1. Copy the entire "Storage_Monitor" folder into the "AutomationScripts" folder on TFISERVER (or any other network accesbible location). +2. Edit "sendmail.ini" with your desired email and password. +3. Add a group policy object for with logon script to run the local copy of wscript.exe with the absolute path for the script specified as the main argument followed by the desired arguments for the script. (example, script directory C:\Windows\System32\wscript.exe parameter directory \\tfiserver\AutomationScripts\Workstation_USB_Monitor\Workstation_USB_Monitor.vbs --gui) +4. Verify that each workstation runs the script on user logon and that UAC is configured to allow sendmail.exe to run. +5. To disable email notifications, run with the -e or --email argument set. +6. To disable logging, run with the -l or --log argument set. +7. To disable the diablog box that appears when new devices are detected, run with the -g or --gui argument set. +8. To run silently in the backround with email notifications and logging enabled, run with the -s or --silent argument set. + +NOTES: SendMail for Windows is required and included in the "Storage_Monitor" folder. The SendMail data files must be included in the same directory as "Data_Monitor.vbs" in order for emails to be sent correctly. \ No newline at end of file diff --git a/Warning.mail b/Warning.mail new file mode 100644 index 0000000..46b134b --- /dev/null +++ b/Warning.mail @@ -0,0 +1 @@ +ÿþ \ No newline at end of file diff --git a/Workstation_USB_Monitor.vbs b/Workstation_USB_Monitor.vbs new file mode 100644 index 0000000..b44b1d8 --- /dev/null +++ b/Workstation_USB_Monitor.vbs @@ -0,0 +1,250 @@ +'File Name: Workstation_USB_Monitor.vbs +'Version: v1.8, 2/19/2018 +'Author: Justin Grimes, 6/1/2018 + +Option Explicit +dim strComputer, objWMIService, objNet, objFSO, colMonitoredEvents, objShell, wmiServices, wmiDiskDrives, wmiDiskDrive, _ + query, wmiDiskPartitions, wmiDiskPartition, wmiLogicalDisks, wmiLogicalDisk, return1, return2, objLatestEvent, param1, _ + param2, param3, param4, param5, usbOnly, silentOnly, arg, userName, hostName, mailFile, mFile, mailData, strComputerName, _ + resultCounter, strSafeDate, strSafeTime, strDateTime, strLogFilePath, strLogFileName, returnData, objLogFile, emailDisable, _ + logDisable, guiDisable, strSafeTimeRAW, strSafeTimeDIFF, strSafeTimeLAST, company, companyAbbreviation, fromEmail, toemail, _ + sendmailPath, logPath + +'Define variables for the session +' ---------- +' SET THESE VARIABLES TO YOUR ENVIRONMENT!!! +company = "Company" +companyAbbreviation = "Company" +fromEmail = "Server@company.com" +toEmail = "IT@company.com" +sendmailPath = "sendmail.exe" +logPath = "\\server\Logs" +' ---------- +strComputer = "." +resultCounter = 0 +param1 = "" +param2 = "" +strSafeTimeRAW = 0 +strSafeTimeDIFF = 0 +strSafeTimeLAST = 0 +usbOnly = false +silentOnly = false +emailDisable = false +logDisable = false +guiDisable = false +Set objFSO = CreateObject("Scripting.FileSystemObject") +Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") +Set colMonitoredEvents = objWMIService.ExecNotificationQuery("SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE Targetinstance " & _ + "ISA 'Win32_PNPEntity' and TargetInstance.DeviceId like '%USBStor%'") +Set wmiServices = GetObject ("winmgmts:{impersonationLevel=Impersonate}!//" & strComputer) +Set arg = WScript.Arguments +Set objNet = CreateObject("Wscript.Network") +Set objShell = WScript.CreateObject("WScript.Shell") +strComputerName = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%") +userName = objNet.Username +hostName = objNet.Computername +mailFile = "C:\Users\" & userName & "\Warning.mail" + + +'Retrieve the specified arguments. +If (arg.Count > 0) Then + param1 = arg(0) +End If +If (arg.Count > 1) Then + param2 = arg(1) +End If +If (arg.Count > 2) Then + param3 = arg(2) +End If +If (arg.Count > 3) Then + param4 = arg(3) +End If +If (arg.Count > 4) Then + param5 = arg(4) +End If + +'If the -u or --usb arguments are set we only retrieve data for USB storage devices. +If (param1 = "-u" Or param1 = "--usb") Then + usbOnly = true +End If +If (param2 = "-u" Or param2 = "--usb") Then + usbOnly = true +End If +If (param3 = "-u" Or param3 = "--usb") Then + usbOnly = true +End If +If (param4 = "-u" Or param4 = "--usb") Then + usbOnly = true +End If +If (param5 = "-u" Or param5 = "--usb") Then + usbOnly = true +End If +'If the -e or --email arguments are set we disable the notification email. +If (param1 = "-e" Or param1 = "--email") Then + emailDisable = true +End If +If (param2 = "-e" Or param2 = "--email") Then + emailDisable = true +End If +If (param3 = "-e" Or param3 = "--email") Then + emailDisable = true +End If +If (param4 = "-e" Or param4 = "--email") Then + emailDisable = true +End If +If (param5 = "-e" Or param5 = "--email") Then + emailDisable = true +End If +'If the -l or --log arguments are set we disable the logfile. +If (param1 = "-l" Or param1 = "--log") Then + logDisable = true +End If +If (param2 = "-l" Or param2 = "--log") Then + logDisable = true +End If +If (param3 = "-l" Or param3 = "--log") Then + logDisable = true +End If +If (param4 = "-l" Or param4 = "--log") Then + logDisable = true +End If +If (param5 = "-l" Or param5 = "--log") Then + logDisable = true +End If +'If the -g or --gui arguments are set we disable the GUI. +If (param1 = "-g" Or param1 = "--gui") Then + guiDisable = true +End If +If (param2 = "-g" Or param2 = "--gui") Then + guiDisable = true +End If +If (param3 = "-g" Or param3 = "--gui") Then + guiDisable = true +End If +If (param4 = "-g" Or param4 = "--gui") Then + guiDisable = true +End If +If (param5 = "-g" Or param4 = "--gui") Then + guiDisable = true +End If +'If the -s or --silent arguments are set we disable all echo's within the script. +If (param1 = "-s" Or param1 = "--silent") Then + silentOnly = true +End If +If (param2 = "-s" Or param2 = "--silent") Then + silentOnly = true +End If +If (param3 = "-s" Or param3 = "--silent") Then + silentOnly = true +End If +If (param4 = "-s" Or param4 = "--silent") Then + silentOnly = true +End If +If (param5 = "-s" Or param5 = "--silent") Then + silentOnly = true +End If + +'A funciton for running SendMail. +Function SendEmail() + objShell.run sendmailPath & " " & mailFile +End Function + +'Perform the loop that checks for new devices. +Do While True + Set objLatestEvent = colMonitoredEvents.NextEvent + 'If USB only is set by the -u or --usb argument we run the top query. If -u or --usb is not set we run the bottom query. + if (usbOnly = true) Then + Set wmiDiskDrives = wmiServices.ExecQuery ( "SELECT Caption, DeviceID FROM Win32_DiskDrive WHERE InterfaceType = 'USB'") + End If + if (usbOnly = false) Then + Set wmiDiskDrives = wmiServices.ExecQuery ( "SELECT Caption, DeviceID FROM Win32_DiskDrive") + End If + If (resultCounter = 0) Then + 'Use the disk drive device id to find associated information about the device. + For Each wmiDiskDrive In wmiDiskDrives + query = "ASSOCIATORS OF {Win32_DiskDrive.DeviceID='" & wmiDiskDrive.DeviceID & "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition" + Set wmiDiskPartitions = wmiServices.ExecQuery(query) + resultCounter = resultCounter + 1 + 'Use partition device id to find logical disk. + For Each wmiDiskPartition In wmiDiskPartitions + Set wmiLogicalDisks = wmiServices.ExecQuery ("ASSOCIATORS OF {Win32_DiskPartition.DeviceID='" & wmiDiskPartition.DeviceID & _ + "'} WHERE AssocClass = Win32_LogicalDiskToPartition") + return1 = "" + 'Build the return data + For Each wmiLogicalDisk In wmiLogicalDisks + return1 = "Device Type: " & wmiDiskDrive.Caption & ", " & _ + vbNewLine & "Device ID: " & wmiDiskPartition.DeviceID & ", " & _ + vbNewLine & "Logical Volume: " & wmiLogicalDisk.DeviceID & _ + vbNewLine & vbNewLine + return2 = return1 & return2 + Next + Next + Next + End IF + 'Detection starts here and stops here when listening for more devices. (Be careful what goes near here). + returnData = Notify() + If (logDisable = false) Then + CreateLog returnData, logPath + End If +Loop + +'A function to format the notification email and notify the user. +function Notify() + If (resultCounter > 0) Then + resultCounter = resultCounter - 1 + End If + If (resultCounter = 0) Then + 'Prepare the notification email and popup. + Set mFile = objFSO.CreateTextFile(mailFile, true, false) + mFile.Write "To: " & toEmail & vbNewLine & "From: " & fromEmail & vbNewLine & "Subject: " & companyAbbreviation & " New Storage Device Connected!!!" & _ + vbNewLine & "This is an automatic email from the " & company & " Network to notify you that a new storage device was detected on a domain workstation." & _ + vbNewLine & vbNewLine & _ + "Please review the information below to verify that the connected device is not a threat." & _ + vbNewLine & vbNewLine & _ + "DEVICE DETAILS: " & _ + vbNewLine & vbNewLine & _ + "Workstation: " & hostName & ", " & _ + vbNewLine & "Username: " & userName & ", " & _ + vbNewLine & vbNewLine & "Detected Devices: " & _ + vbNewLine &vbNewLine & return2 & vbNewLine & _ + "This check was generated by " & strComputerName & " and is run in the background upon user logon." & _ + vbNewLine & vbNewLine & _ + "Script: """& companyAbbreviation & " Workstation_USB_Monitor.vbs""" + mFile.Close + strSafeTime = Right("0" & Hour(Now), 2) & Right("0" & Minute(Now), 2) & Right("0" & Second(Now), 2) + strSafeTimeRAW = strSafeTime + strSafeTimeDIFF = strSafeTime - strSafeTimeLAST + If (emailDisable = false And strSafeTimeDIFF > 6) Then + SendEmail + End If + 'Display results if the silent argument is not set. + If (silentOnly = false And guiDisable = false And strSafeTimeDIFF > 6) Then + mailData = "Devices Detected: " & vbNewLine & vbNewLine & return2 + MsgBox mailData, vbOKOnly, "Workstation USB Monitor" + End If + 'Reset the outputs for the next iteration of the loop above. (MUST BE DONE!!! This was the source of a lot of debugging.) + Notify = return2 + return2 = "" + return1 = "" + End If +End Function + +'A function to create a log file. +Function CreateLog(strEventInfo, strLogFilePath) + If Not (strEventInfo = "") Then + 'Logfile related variables are defined at log creation time for accurate time reporting. + strSafeDate = DatePart("yyyy",Date) & Right("0" & DatePart("m",Date), 2) & Right("0" & DatePart("d",Date), 2) + strSafeTime = Right("0" & Hour(Now), 2) & Right("0" & Minute(Now), 2) & Right("0" & Second(Now), 2) + strSafeTimeRAW = strSafeTime + strSafeTimeDIFF = strSafeTime - strSafeTimeLAST + 'Some machines with lower performance may create multiple logfiles in rapid succession. This check ensures logs aren't duplicated. + If (strSafeTimeDIFF > 6) Then + strDateTime = strSafeDate & "-" & strSafeTime + strLogFileName = strLogFilePath & "\" & userName & "-" & strDateTime & "-workstation_usb_monitor.txt" + Set objLogFile = objFSO.CreateTextFile(strLogFileName, true, false) + objLogFile.WriteLine(strEventInfo) + objLogFile.Close + End IF + strSafeTimeLAST = strSafeTimeRAW + End If +End Function diff --git a/Workstation_USB_Monitor.vbs_Readme.txt b/Workstation_USB_Monitor.vbs_Readme.txt new file mode 100644 index 0000000..5bfcf18 --- /dev/null +++ b/Workstation_USB_Monitor.vbs_Readme.txt @@ -0,0 +1,32 @@ +NAME: Workstation_USB_Monitor.vbs + +TYPE: Visual Basic Script + +PRIMARY LANGUAGE: VBS + +AUTHOR: Justin Grimes + +ORIGINAL VERSION DATE: 6/1/2018 + +CURRENT VERSION DATE: 2/19/2019 + +VERSION: v1.9 + +DESCRIPTION: +A simple script to be run on workstations that monitors for changes in disk drive configuration. + +PURPOSE: +To monitor company workstation storage devices for changes. + + +INSTALLATION INSTRUCTIONS: +1. Copy the entire "Storage_Monitor" folder into the "AutomationScripts" folder on TFISERVER (or any other network accesbible location). +2. Edit "sendmail.ini" with your desired email and password. +3. Add a group policy object for with logon script to run the local copy of wscript.exe with the absolute path for the script specified as the main argument followed by the desired arguments for the script. (example, script directory C:\Windows\System32\wscript.exe parameter directory \\tfiserver\AutomationScripts\Workstation_USB_Monitor\Workstation_USB_Monitor.vbs --gui) +4. Verify that each workstation runs the script on user logon and that UAC is configured to allow sendmail.exe to run. +5. To disable email notifications, run with the -e or --email argument set. +6. To disable logging, run with the -l or --log argument set. +7. To disable the diablog box that appears when new devices are detected, run with the -g or --gui argument set. +8. To run silently in the backround with email notifications and logging enabled, run with the -s or --silent argument set. + +NOTES: SendMail for Windows is required and included in the "Storage_Monitor" folder. The SendMail data files must be included in the same directory as "Data_Monitor.vbs" in order for emails to be sent correctly. \ No newline at end of file diff --git a/error.log b/error.log new file mode 100644 index 0000000..e69de29 diff --git a/libeay32.dll b/libeay32.dll new file mode 100644 index 0000000..9b92ce8 Binary files /dev/null and b/libeay32.dll differ diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..705bf89 --- /dev/null +++ b/license.txt @@ -0,0 +1,271 @@ + + fake sendmail for windows + + Copyright (c) 2004-2011, Byron Jones, sendmail@glob.com.au + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the glob nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + version 32 (18 june 2011) + - fix handling of invalid recipients + + version 31 (15 sep, 2010) + - fix encoding of 8-bit data + + version 30 (30 aug, 2010) + - update to latest indy version (fixes many issues) + - add about/version + + version 29 (sep 8, 2009) + - fix for another indy 10 "range check error" (when using ssl) + + version 28 (aug 12, 2009) + - set ERRORLEVEL to -1 to assist php + + version 27 (aug 3, 2009) + - don't treat log write errors as fatal + + version 26 (apr 1, 2009) + - no longer require -t parameter + - skip first line if it starts with "from " (mail spool delimiting line) + + version 25 (mar 29, 2009) + - added force_recipient + + version 24 (dec 2, 2008) + - fixes for ssl + + version 23 (apr 24, 2008) + - fix timezone in date header + + version 22 (jan 14, 2008) + - fixes to error handling + + version 21 (jan 2, 2008) + - added TLS support + + version 20 (apr 3, 2007) + - fixed race condition in IIS's pickup delivery + + version 19 (jul 24, 2006) + - added support for delivery via IIS's pickup directory + - optionally reads settings from the registry (in absense of the ini file) + + version 18 (may 1, 2006) + - fix for indy 10 "range check error" + + version 17 (nov 2, 2005) + - only process message header + - optionally use madexcept for detailed crash dumps + + version 16 (sep 12, 2005) + - send hostname and domain with HELO/EHLO + - configurable HELO/EHLO hostname + - upgraded to indy 10 + + version 15 (aug 23, 2005) + - fixes error messages when debug_logfile is not specified + + version 14 (jun 28, 2005) + - errors output to STDERR + - fixes for delphi 7 compilation + - added 'connecting to..' debug logging + - reworked error and debug log format + + version 13 (jun 8, 2005) + - added fix to work around invalid multiple header instances + + version 12 (apr 30, 2005) + - added cc and bcc support + + version 11 (feb 17, 2005) + - added pop3 support (for pop before smtp authentication) + + version 10 (feb 11, 2005) + - added support for specifying a different smtp port + + version 9 (sep 22, 2004) + - added force_sender + + version 8 (sep 22, 2004) + - *really* fixes broken smtp auth + + version 7 (sep 22, 2004) + - fixes broken smtp auth + + version 6 (sep 22, 2004) + - correctly quotes MAIL FROM and RCPT TO addresses in <> + + version 5 (sep 16, 2004) + - now sends the message unchanged (rather than getting indy + to regenerate it) + + version 4 (aug 17, 2004) + - added debug_logfile parameter + - improved error messages + + version 3 (jul 15, 2004) + - smtp authentication support + - clearer error message when missing from or to address + - optional error logging + - adds date: if missing + + version 2 (jul 6, 2004) + - reads default domain from registry (.ini setting overrides) + + version 1 (jul 1, 2004) + - initial release + + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. Actually both licenses are BSD-style + Open Source licenses. In case of any license issues related to OpenSSL + please contact openssl-core@openssl.org. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + diff --git a/sendmail.exe b/sendmail.exe new file mode 100644 index 0000000..b12b550 Binary files /dev/null and b/sendmail.exe differ diff --git a/sendmail.ini b/sendmail.ini new file mode 100644 index 0000000..d3c9a69 --- /dev/null +++ b/sendmail.ini @@ -0,0 +1,72 @@ +; configuration for fake sendmail + +; if this file doesn't exist, sendmail.exe will look for the settings in +; the registry, under HKLM\Software\Sendmail + +[sendmail] + +; you must change mail.mydomain.com to your smtp server, +; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup) +; emails delivered via IIS's pickup directory cause sendmail to +; run quicker, but you won't get error messages back to the calling +; application. + +smtp_server=secure.emailsrvr.com + +; smtp port (normally 25) + +smtp_port=465 + +; SMTPS (SSL) support +; auto = use SSL for port 465, otherwise try to use TLS +; ssl = alway use SSL +; tls = always use TLS +; none = never try to use SSL + +smtp_ssl=ssl + +; the default domain for this server will be read from the registry +; this will be appended to email addresses when one isn't provided +; if you want to override the value in the registry, uncomment and modify + +;default_domain=secure.emailsrvr.com + +; log smtp errors to error.log (defaults to same directory as sendmail.exe) +; uncomment to enable logging + +error_logfile=error.log + +; create debug log as debug.log (defaults to same directory as sendmail.exe) +; uncomment to enable debugging + +;debug_logfile=debug.log + +; if your smtp server requires authentication, modify the following two lines + +auth_username=it@company.com +auth_password=ITEMAILPASSWORD + +; if your smtp server uses pop3 before smtp authentication, modify the +; following three lines. do not enable unless it is required. + +pop3_server= +pop3_username= +pop3_password= + +; force the sender to always be the following email address +; this will only affect the "MAIL FROM" command, it won't modify +; the "From: " header of the message content + +force_sender=admin@tfpm.com + +; force the sender to always be the following email address +; this will only affect the "RCTP TO" command, it won't modify +; the "To: " header of the message content + +force_recipient= + +; sendmail will use your hostname and your default_domain in the ehlo/helo +; smtp greeting. you can manually set the ehlo/helo name if required + +hostname= + diff --git a/ssleay32.dll b/ssleay32.dll new file mode 100644 index 0000000..a70b5a5 Binary files /dev/null and b/ssleay32.dll differ