From 5d244973696373bf69ee951a146b2f255f229ec2 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 19 Apr 2019 11:53:32 +0200 Subject: [PATCH] Fix scenario example telnet --- apps/protocols/telnet/mode/scenario.pm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/protocols/telnet/mode/scenario.pm b/apps/protocols/telnet/mode/scenario.pm index 5df5ca056..966faa363 100644 --- a/apps/protocols/telnet/mode/scenario.pm +++ b/apps/protocols/telnet/mode/scenario.pm @@ -34,14 +34,13 @@ sub new { bless $self, $class; $self->{version} = '1.0'; - $options{options}->add_options(arguments => - { - "scenario:s" => { name => 'scenario' }, - "warning:s" => { name => 'warning' }, - "critical:s" => { name => 'critical' }, - "hostname:s" => { name => 'hostname' }, - "port:s" => { name => 'port', default => 23 }, - }); + $options{options}->add_options(arguments => { + "scenario:s" => { name => 'scenario' }, + "warning:s" => { name => 'warning' }, + "critical:s" => { name => 'critical' }, + "hostname:s" => { name => 'hostname' }, + "port:s" => { name => 'port', default => 23 }, + }); return $self; } @@ -55,7 +54,7 @@ sub check_options { # {"cmd": "open", "options": { "Host": "10.0.0.1", "Port": "23", "Timeout": "30" } }, # {"cmd": "login", "options": { "Name": "admin", "Password": "pass", "Timeout": "5" } }, # {"cmd": "waitfor", "options": { "Match": "/string/", "Timeout": "5" } }, - # {"cmd": "put", "options": { "String": "/mystring/", "Timeout": "5" } }, + # {"cmd": "put", "options": { "String": "mystring", "Timeout": "5" } }, # {"cmd": "close" } #] if (!defined($self->{option_results}->{scenario})) {