Changeset 1618

Show
Ignore:
Timestamp:
06/10/08 23:18:11 (4 months ago)
Author:
kindlund
Message:

Updated email notification interface.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hive/trunk/data_webapp/app/models/post_office.rb

    r1617 r1618  
    44    @recipients = job.job_source.response_address 
    55    return if @recipients.to_s.empty? 
    6     @from = "honeyclient@navi.kindlund.net
     6    @from = "honeyclient@drone.honeyclient.org
    77    headers "Reply-to" => "honeyclient@mitre.org" 
    88    @sent_on = Time.now 
    99    @content_type = "text/plain" 
    1010    body[:num_urls] = job.pending_urls_count 
     11    body[:queue_urls] = job.queue_urls 
    1112    body[:job_id] = job.id.nil? ? 0 : job.id 
    1213    if (body[:job_id] > 0) and (body[:num_urls] > 0)  
     
    2324    @recipients = job.job_source.response_address 
    2425    return if @recipients.to_s.empty? 
    25     @from = "honeyclient@navi.kindlund.net
     26    @from = "honeyclient@drone.honeyclient.org
    2627    headers "Reply-to" => "honeyclient@mitre.org" 
    2728    body[:job_id] = job.id.nil? ? 0 : job.id 
     
    3031    @sent_on = Time.now 
    3132    @content_type = "text/plain" 
    32     body[:visited] = job.completed_urls_count 
    33     body[:compromised] = 0 
     33    body[:num_urls] = job.completed_urls_count 
     34    body[:history_urls] = job.history_urls 
     35    body[:num_suspicious] = 0 
    3436    job.history_urls.each do |u| 
    3537      if u.status == 'suspicious' 
    36         body[:compromised] += 1 
     38        body[:num_suspicious] += 1 
    3739      end 
    3840    end 
    39     body[:compromise_found] = (body[:compromised] > 0) 
     41    body[:suspicious_found] = (body[:num_suspicious] > 0) 
    4042  end 
    4143end 
  • hive/trunk/data_webapp/app/views/post_office/job_completed.text.plain.erb

    r1617 r1618  
    1919Report Summary 
    2020============== 
    21 Suspicious Activity: <%= @compromise_found ? "FOUND" : "Not Found" %> 
    22 URLs Visited:        <%= @visited.to_s %> 
    23 URLs Compromised:    <%= @compromised.to_s %> 
     21Suspicious Activity:       <%= @suspicious_found ? "FOUND" : "Not Found" %> 
     22Number of Parsed URLs:     <%= @num_urls.to_s %> 
     23Number of Suspicious URLs: <%= @num_suspicious.to_s %> 
     24 
     25(Note: All URLs below have the prefix of 'BLOCKED::' in order to disable automatic loading of URLs within email clients.) 
     26 
     27+-------------------------------+ 
     28| Format: Status - URL          | 
     29+-------------------------------+ 
     30<%- @history_urls.each do |h| -%> 
     31<%= h.status.to_s %> - BLOCKED::<%= h.url.to_s %> 
     32<%- end -%> 
    2433 
    2534--------------------------------- 
  • hive/trunk/data_webapp/app/views/post_office/job_submitted.text.plain.erb

    r1617 r1618  
    77Job ID:                #<%= @job_id.to_s %> 
    88Number of URLs Parsed: <%= @num_urls.to_s %> 
     9 
     10(Note: All URLs below have the prefix of 'BLOCKED::' in order to disable automatic loading of URLs within email clients.) 
     11 
     12URLs Parsed: 
     13============ 
     14<%- @queue_urls.each do |q| -%> 
     15BLOCKED::<%= q.url.to_s %> 
     16<%- end -%>