<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -25,20 +25,21 @@ LOG_FILE = '/var/log/sshd/*'
 
 #misc
 TIME_LOCALE = 'GMT+1'
-##### CHECK PERMISSIONS ON DESTINATION DIRECTORY. YOU MAY NEED TO TOUCH THE EMAIL_LOG_FILE FILE TO INITIALLY CREATE IT
-EMAIL_LOG_FILE    = '/var/log/notify_isp.log' 
+EMAIL_LOG_FILE    = '/var/log/notify_isp.log'  ##### CHECK PERMISSIONS ON DESTINATION DIRECTORY. 
 
 #guess apps... override if required
 GREP_BIN  = `which grep`.strip
 CAT_BIN   = `which cat`.strip
 WHOIS_BIN = `which whois`.strip
 HOST_BIN  = `which host`.strip
+TOUCH_BIN = `which touch`.strip
 
 #check that we have all our BINs
 raise 'Could not find grep on your system. Manually configure GREP_BIN' if GREP_BIN == ''
 raise 'Could not find cat on your system. Manually configure CAT_BIN' if CAT_BIN == ''
 raise 'Could not find whois on your system. Manually configure WHOIS_BIN' if WHOIS_BIN == ''
 raise 'Could not find host on your system. Manually configure HOST_BIN' if HOST_BIN == ''
+raise 'Could not find touch on your system. Manually configure TOUCH_BIN' if HOST_BIN == ''
 
 
 ################# UTILS ########################
@@ -105,6 +106,9 @@ else
   raise 'No ip address or host given. Exiting'
 end
 
+#make sure the EMAIL_LOG_FILE exists
+eval(&quot;`#{TOUCH_BIN} #{EMAIL_LOG_FILE}`&quot;)
+
 #extract all email contacts for given host
 contacts = get_contacts_for_host(host)
 
@@ -135,7 +139,7 @@ raise &quot;No email addresses were returned&quot; unless contacts.length &gt; 0
 evidence = eval(&quot;`#{CAT_BIN} #{LOG_FILE} | #{GREP_BIN} #{host}`&quot;).strip
 raise &quot;No evidence found for #{host}. Aborting&quot; unless evidence &amp;&amp; (evidence.length &gt; 0)
 
-#workaround for DenyHosts that runs plugin evrytime an IP is added against all blacklisted IPS
+#workaround for DenyHosts that runs the plugin evrytime an IP is added against all blacklisted IPS
 sent = eval(&quot;`#{CAT_BIN} #{EMAIL_LOG_FILE} | #{GREP_BIN} #{host}`&quot;).strip
 raise &quot;Host #{host} has already been reported. Not reporting again.&quot; if sent &amp;&amp; sent.length &gt; 0
 </diff>
      <filename>notify_isp.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8770c27547fc6b9ce4c51bee3e758e8f6f0aebc2</id>
    </parent>
  </parents>
  <author>
    <name>Nazar Aziz</name>
    <email>nazar@panthersoftware.com</email>
  </author>
  <url>http://github.com/nazar/report-hack-isp/commit/7602dcd96e252fd8e95f0c5a8a3d0e9aaa7226ad</url>
  <id>7602dcd96e252fd8e95f0c5a8a3d0e9aaa7226ad</id>
  <committed-date>2008-07-25T09:15:21-07:00</committed-date>
  <authored-date>2008-07-25T09:15:21-07:00</authored-date>
  <message>touch the log file to create it if it is not there.</message>
  <tree>9849f81856b092f57a2cd4d7c66d5fe4c82cab20</tree>
  <committer>
    <name>Nazar Aziz</name>
    <email>nazar@panthersoftware.com</email>
  </committer>
</commit>
