hookd-client 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/hookd/interaction.rb +10 -3
- data/lib/hookd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e733c25ddc48c4abc81de335f540b1c04b25e93d1ae662c4140ee1b4d735afc
|
4
|
+
data.tar.gz: 221c74e9d5d1bb915799cb9ec852f54e8ea1cea894bd5246982fab00726769c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f41965d7a08d776b63b91b03cef5275183de8a4f58eb76077633ebbe790b19c042f94ed2a42c664b92b162d07c55d3e0bd75985c359f656e6f25d30848c5382
|
7
|
+
data.tar.gz: e88fa863ced788b552d5430d68ee351e5c7ed7b28514a59314937dda1ce3a7250cf75c26cf8ce4346780d24b78ed742c1523d50a206e6d7062664cd6e6014ea1
|
data/lib/hookd/interaction.rb
CHANGED
@@ -3,11 +3,12 @@
|
|
3
3
|
module Hookd
|
4
4
|
# Represents a captured DNS or HTTP interaction
|
5
5
|
class Interaction
|
6
|
-
attr_reader :type, :timestamp, :data
|
6
|
+
attr_reader :type, :timestamp, :source_ip, :data
|
7
7
|
|
8
|
-
def initialize(type:, timestamp:, data:)
|
8
|
+
def initialize(type:, timestamp:, source_ip:, data:)
|
9
9
|
@type = type
|
10
10
|
@timestamp = timestamp
|
11
|
+
@source_ip = source_ip
|
11
12
|
@data = data
|
12
13
|
end
|
13
14
|
|
@@ -16,6 +17,7 @@ module Hookd
|
|
16
17
|
new(
|
17
18
|
type: hash['type'],
|
18
19
|
timestamp: hash['timestamp'],
|
20
|
+
source_ip: hash['source_ip'],
|
19
21
|
data: hash['data']
|
20
22
|
)
|
21
23
|
end
|
@@ -31,7 +33,12 @@ module Hookd
|
|
31
33
|
end
|
32
34
|
|
33
35
|
def to_s
|
34
|
-
"#<Hookd::Interaction type=#{type} timestamp=#{timestamp}>"
|
36
|
+
"#<Hookd::Interaction type=#{type} timestamp=#{timestamp} source_ip=#{source_ip}>"
|
37
|
+
end
|
38
|
+
|
39
|
+
def inspect
|
40
|
+
"#<Hookd::Interaction:#{object_id.to_s(16)} @type=#{type.inspect}, @timestamp=#{timestamp.inspect}, " \
|
41
|
+
"@source_ip=#{source_ip.inspect}, @data=#{data.inspect}>"
|
35
42
|
end
|
36
43
|
end
|
37
44
|
end
|
data/lib/hookd/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hookd-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jomar
|
@@ -29,7 +29,7 @@ licenses:
|
|
29
29
|
- MIT
|
30
30
|
metadata:
|
31
31
|
homepage_uri: https://github.com/JoshuaMart/hookd
|
32
|
-
source_code_uri: https://github.com/jomar/
|
32
|
+
source_code_uri: https://github.com/jomar/hookd
|
33
33
|
rubygems_mfa_required: 'true'
|
34
34
|
rdoc_options: []
|
35
35
|
require_paths:
|