summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/tcp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/protocoltest/tcp.rb')
-rw-r--r--lib/custodian/protocoltest/tcp.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb
index 5f29b7f..9806565 100644
--- a/lib/custodian/protocoltest/tcp.rb
+++ b/lib/custodian/protocoltest/tcp.rb
@@ -17,6 +17,12 @@ class TCPTest < ProtocolTest
#
+ # The input line
+ #
+ attr_reader :line
+
+
+ #
# The host to test against.
#
attr_reader :host
@@ -44,6 +50,11 @@ class TCPTest < ProtocolTest
def initialize( line )
#
+ # Save the line
+ #
+ @line = line
+
+ #
# Save the host
#
@host = line.split( /\s+/)[0]
@@ -90,12 +101,7 @@ class TCPTest < ProtocolTest
# Convert this class to JSON such that it may be serialized.
#
def to_json
- hash = {
- :test_type => 'tcp',
- :test_target => @host,
- :test_port => @port,
- :banner => @banner
- }
+ hash = { :line => @line }
hash.to_json
end