mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-28 11:41:46 +03:00
Remove support for deprecated password method
To define a client/server password, just use --password.
This commit is contained in:
parent
0ee0f06c64
commit
bcdaa089bb
@ -181,10 +181,7 @@ Command-Line Options
|
||||
-p PORT, --port PORT define the client/server TCP port [default: 61209]
|
||||
-B BIND_ADDRESS, --bind BIND_ADDRESS
|
||||
bind server to the given IPv4/IPv6 address or hostname
|
||||
--password-badidea PASSWORD_ARG
|
||||
define password from the command line
|
||||
--password define a client/server password from the prompt or
|
||||
file
|
||||
--password define a client/server password
|
||||
--disable-autodiscover
|
||||
Hide Glances server from the auto discover feature
|
||||
--snmp-community SNMP_COMMUNITY
|
||||
|
@ -153,10 +153,8 @@ Start the client browser (browser mode):\n\
|
||||
help=_('define the client/server TCP port [default: {0}]').format(self.server_port))
|
||||
parser.add_argument('-B', '--bind', default='0.0.0.0', dest='bind_address',
|
||||
help=_('bind server to the given IPv4/IPv6 address or hostname'))
|
||||
parser.add_argument('--password-badidea', dest='password_arg',
|
||||
help=_('define password from the command line'))
|
||||
parser.add_argument('--password', action='store_true', default=False, dest='password_prompt',
|
||||
help=_('define a client/server password from the prompt or file'))
|
||||
help=_('define a client/server password'))
|
||||
parser.add_argument('--snmp-community', default='public', dest='snmp_community',
|
||||
help=_('SNMP community'))
|
||||
parser.add_argument('--snmp-port', default=161, type=int,
|
||||
@ -226,13 +224,7 @@ Start the client browser (browser mode):\n\
|
||||
|
||||
# Server or client login/password
|
||||
args.username = self.username
|
||||
if args.password_arg is not None:
|
||||
from hashlib import sha256
|
||||
# Password is given as an argument
|
||||
# Hash with SHA256
|
||||
# Only the SHA will be transmit on the network
|
||||
args.password = sha256(args.password_arg).hexdigest()
|
||||
elif args.password_prompt:
|
||||
if args.password_prompt:
|
||||
# Interactive or file password
|
||||
if args.server:
|
||||
args.password = self.__get_password(
|
||||
|
@ -99,7 +99,7 @@ connect to a Glances server by IPv4/IPv6 address or hostname
|
||||
define the client/server TCP port [default: 61209]
|
||||
.TP
|
||||
.B \-\-password
|
||||
define a client/server password from the prompt or file
|
||||
define a client/server password
|
||||
.TP
|
||||
.B \-B BIND_ADDRESS, \-\-bind BIND_ADDRESS
|
||||
bind server to the given IPv4/IPv6 address or hostname
|
||||
|
Loading…
Reference in New Issue
Block a user