From bd4f7c9af1bf2503001b34eb6568369de500ee2a Mon Sep 17 00:00:00 2001 From: Chris Truncer Date: Thu, 3 Dec 2015 13:08:09 -0700 Subject: [PATCH] small change in variable name --- common/helpers.py | 2 +- protocols/servers/ftp_server.py | 2 +- protocols/servers/http_server.py | 2 +- protocols/servers/https_server.py | 2 +- protocols/servers/sftp_server.py | 2 +- protocols/servers/smtp_server.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/helpers.py b/common/helpers.py index a2a32da..a2aea16 100644 --- a/common/helpers.py +++ b/common/helpers.py @@ -49,7 +49,7 @@ def cli_parser(): "--server", default=None, metavar='[http]', help="Create a server for the specified protocol.") servers.add_argument( - "--port", default=None, metavar='[80]', + "--server-port", default=None, metavar='[80]', help="Specify a non-standard port for the specified protocol.") servers.add_argument("--list-servers", default=False, action='store_true', help="Lists all supported server protocols.") diff --git a/protocols/servers/ftp_server.py b/protocols/servers/ftp_server.py index b159316..a19b276 100644 --- a/protocols/servers/ftp_server.py +++ b/protocols/servers/ftp_server.py @@ -20,7 +20,7 @@ class Server: self.password = cli_object.password self.data_directory = "" if cli_object.port: - self.port = int(cli_object.port) + self.port = int(cli_object.server_port) else: self.port = 21 diff --git a/protocols/servers/http_server.py b/protocols/servers/http_server.py index d26e02b..8f26a27 100644 --- a/protocols/servers/http_server.py +++ b/protocols/servers/http_server.py @@ -17,7 +17,7 @@ class Server: def __init__(self, cli_object): self.protocol = "http" if cli_object.port: - self.port = int(cli_object.port) + self.port = int(cli_object.server_port) else: self.port = 80 diff --git a/protocols/servers/https_server.py b/protocols/servers/https_server.py index b01a563..86da241 100644 --- a/protocols/servers/https_server.py +++ b/protocols/servers/https_server.py @@ -19,7 +19,7 @@ class Server: def __init__(self, cli_object): self.protocol = "https" if cli_object.port: - self.port = int(cli_object.port) + self.port = int(cli_object.server_port) else: self.port = 443 diff --git a/protocols/servers/sftp_server.py b/protocols/servers/sftp_server.py index ba3695b..ee734c4 100644 --- a/protocols/servers/sftp_server.py +++ b/protocols/servers/sftp_server.py @@ -26,7 +26,7 @@ class Server: self.password = cli_object.password self.sftp_directory = helpers.ea_path() + '/data' if cli_object.port: - self.port = int(cli_object.port) + self.port = int(cli_object.server_port) else: self.port = 22 self.rsa_key = """ diff --git a/protocols/servers/smtp_server.py b/protocols/servers/smtp_server.py index a19609c..1edabb6 100644 --- a/protocols/servers/smtp_server.py +++ b/protocols/servers/smtp_server.py @@ -19,7 +19,7 @@ class Server: self.protocol = "smtp" if cli_object.port: - self.port = int(cli_object.port) + self.port = int(cli_object.server_port) else: self.port = 25