honeypot 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/honeypot.gemspec +1 -1
- data/lib/honeypot.rb +2 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/honeypot.gemspec
CHANGED
data/lib/honeypot.rb
CHANGED
@@ -2,6 +2,7 @@ require 'ipaddr'
|
|
2
2
|
require 'set'
|
3
3
|
require 'active_support'
|
4
4
|
require 'active_record'
|
5
|
+
require 'fast_timestamp'
|
5
6
|
require 'honeypot/ipaddr_ext'
|
6
7
|
require 'honeypot/remote_request'
|
7
8
|
require 'honeypot/remote_host'
|
@@ -22,7 +23,7 @@ module Honeypot
|
|
22
23
|
remote_host = RemoteHost.find_or_create_by_ip_address effective_ip_address
|
23
24
|
remote_request = remote_requests.find_or_create_by_remote_host_id remote_host.id
|
24
25
|
remote_request.last_http_referer = request.referer if request.referer.present?
|
25
|
-
remote_request.last_request_uri = request.
|
26
|
+
remote_request.last_request_uri = request.fullpath if request.fullpath.present?
|
26
27
|
remote_request.increment :hits
|
27
28
|
remote_request.save!
|
28
29
|
true
|