Changeset 1618
- Timestamp:
- 06/10/08 23:18:11 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
hive/trunk/data_webapp/app/models/post_office.rb
r1617 r1618 4 4 @recipients = job.job_source.response_address 5 5 return if @recipients.to_s.empty? 6 @from = "honeyclient@ navi.kindlund.net"6 @from = "honeyclient@drone.honeyclient.org" 7 7 headers "Reply-to" => "honeyclient@mitre.org" 8 8 @sent_on = Time.now 9 9 @content_type = "text/plain" 10 10 body[:num_urls] = job.pending_urls_count 11 body[:queue_urls] = job.queue_urls 11 12 body[:job_id] = job.id.nil? ? 0 : job.id 12 13 if (body[:job_id] > 0) and (body[:num_urls] > 0) … … 23 24 @recipients = job.job_source.response_address 24 25 return if @recipients.to_s.empty? 25 @from = "honeyclient@ navi.kindlund.net"26 @from = "honeyclient@drone.honeyclient.org" 26 27 headers "Reply-to" => "honeyclient@mitre.org" 27 28 body[:job_id] = job.id.nil? ? 0 : job.id … … 30 31 @sent_on = Time.now 31 32 @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 34 36 job.history_urls.each do |u| 35 37 if u.status == 'suspicious' 36 body[: compromised] += 138 body[:num_suspicious] += 1 37 39 end 38 40 end 39 body[: compromise_found] = (body[:compromised] > 0)41 body[:suspicious_found] = (body[:num_suspicious] > 0) 40 42 end 41 43 end hive/trunk/data_webapp/app/views/post_office/job_completed.text.plain.erb
r1617 r1618 19 19 Report Summary 20 20 ============== 21 Suspicious Activity: <%= @compromise_found ? "FOUND" : "Not Found" %> 22 URLs Visited: <%= @visited.to_s %> 23 URLs Compromised: <%= @compromised.to_s %> 21 Suspicious Activity: <%= @suspicious_found ? "FOUND" : "Not Found" %> 22 Number of Parsed URLs: <%= @num_urls.to_s %> 23 Number 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 -%> 24 33 25 34 --------------------------------- hive/trunk/data_webapp/app/views/post_office/job_submitted.text.plain.erb
r1617 r1618 7 7 Job ID: #<%= @job_id.to_s %> 8 8 Number 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 12 URLs Parsed: 13 ============ 14 <%- @queue_urls.each do |q| -%> 15 BLOCKED::<%= q.url.to_s %> 16 <%- end -%>
