|
|
|
@ -176,19 +176,19 @@ def add_server_hostname(host, path_to_cert, server_hostname):
|
|
|
|
|
def https_server(client, args, unknown_args, url, clVarsCore, wait_thread):
|
|
|
|
|
client_post_auth(client)
|
|
|
|
|
|
|
|
|
|
sym_link = os.path.basename(sys.argv[0])
|
|
|
|
|
if sym_link != 'cl-console':
|
|
|
|
|
wait_thread.stop()
|
|
|
|
|
results = client.service.get_methods(client.sid, 'console')
|
|
|
|
|
find_flag = False
|
|
|
|
|
if hasattr (results, 'stringArray'):
|
|
|
|
|
for _array in results.stringArray:
|
|
|
|
|
if _array.string[0] == sym_link:
|
|
|
|
|
args.method = _array.string[1]
|
|
|
|
|
find_flag = True
|
|
|
|
|
break
|
|
|
|
|
if not find_flag:
|
|
|
|
|
_print (_('Method not found for %s') %sym_link)
|
|
|
|
|
# sym_link = os.path.basename(sys.argv[0])
|
|
|
|
|
# if sym_link != 'cl-console':
|
|
|
|
|
# wait_thread.stop()
|
|
|
|
|
# results = client.service.get_methods(client.sid, 'console')
|
|
|
|
|
# find_flag = False
|
|
|
|
|
# if hasattr (results, 'stringArray'):
|
|
|
|
|
# for _array in results.stringArray:
|
|
|
|
|
# if _array.string[0] == sym_link:
|
|
|
|
|
# args.method = _array.string[1]
|
|
|
|
|
# find_flag = True
|
|
|
|
|
# break
|
|
|
|
|
# if not find_flag:
|
|
|
|
|
# _print (_('Method not found for %s') %sym_link)
|
|
|
|
|
|
|
|
|
|
if args.stop_consoled:
|
|
|
|
|
wait_thread.stop()
|
|
|
|
@ -291,9 +291,9 @@ def main(wait_thread):
|
|
|
|
|
args, unknown_args = parser.parse_known_args()
|
|
|
|
|
wait_thread.start()
|
|
|
|
|
|
|
|
|
|
if os.path.basename(sys.argv[0]) != 'cl-console':
|
|
|
|
|
args.method = '_temp_'
|
|
|
|
|
args.host = 'localhost'
|
|
|
|
|
# if os.path.basename(sys.argv[0]) != 'cl-console':
|
|
|
|
|
# args.method = '_temp_'
|
|
|
|
|
# args.host = 'localhost'
|
|
|
|
|
|
|
|
|
|
if not args.method and args.help:
|
|
|
|
|
wait_thread.stop()
|
|
|
|
|