|
|
|
@ -21,7 +21,7 @@ from sudsds.transport import TransportError
|
|
|
|
|
from client_class import Client_suds
|
|
|
|
|
import traceback as tb
|
|
|
|
|
import time, logging
|
|
|
|
|
import os, sys, datetime
|
|
|
|
|
import os, sys
|
|
|
|
|
import threading, urllib2
|
|
|
|
|
from function import analysis, clear, get_entire_frame
|
|
|
|
|
from pid_information import client_list_methods
|
|
|
|
@ -121,15 +121,11 @@ def https_server(client, args, unknown_args, url, clVarsCore, wait_thread):
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
elif args.method and args.help:
|
|
|
|
|
# now = datetime.datetime.now()
|
|
|
|
|
# print '6 ===> %ds %dms' %(now.second, now.microsecond)
|
|
|
|
|
method_parser, view = get_method_argparser(client, args)
|
|
|
|
|
wait_thread.stop()
|
|
|
|
|
sys.stdout.write("\b")
|
|
|
|
|
sys.stdout.flush()
|
|
|
|
|
method_parser.print_help()
|
|
|
|
|
# now = datetime.datetime.now()
|
|
|
|
|
# print '7 ===> %ds %dms' %(now.second, now.microsecond)
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
try:
|
|
|
|
@ -276,8 +272,6 @@ def add_server_hostname(host, path_to_cert, server_hostname):
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
|
# now = datetime.datetime.now()
|
|
|
|
|
# print '1 ===> %ds %dms' %(now.second, now.microsecond)
|
|
|
|
|
parser = parse()
|
|
|
|
|
args, unknown_args = parser.parse_known_args()
|
|
|
|
|
wait_thread = StoppableThread()
|
|
|
|
@ -287,8 +281,6 @@ def main():
|
|
|
|
|
sys.stdout.write('\r')
|
|
|
|
|
sys.stdout.flush()
|
|
|
|
|
parser.print_help()
|
|
|
|
|
# now = datetime.datetime.now()
|
|
|
|
|
# print '1/2 ===> %ds %dms' %(now.second, now.microsecond)
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
if os.path.basename(sys.argv[0]) != 'cl-console':
|
|
|
|
@ -358,8 +350,8 @@ def main():
|
|
|
|
|
Connect_Error = 1
|
|
|
|
|
crypto_Error = 0
|
|
|
|
|
client, Connect_Error, crypto_Error, passwd_flag, e = \
|
|
|
|
|
connect_with_cert (serv_hostname, path_to_cert, url, args,
|
|
|
|
|
wait_thread, clVarsCore, crypto_Error, Connect_Error)
|
|
|
|
|
connect_with_cert (serv_hostname, path_to_cert, url, args,
|
|
|
|
|
wait_thread, clVarsCore, crypto_Error, Connect_Error)
|
|
|
|
|
get_name_flag = True
|
|
|
|
|
if Connect_Error:
|
|
|
|
|
if crypto_Error and passwd_flag:
|
|
|
|
@ -429,8 +421,6 @@ def main():
|
|
|
|
|
fit_cert_list.sort(key = len)
|
|
|
|
|
Connect_Error = 1
|
|
|
|
|
crypto_Error = 0
|
|
|
|
|
# now = datetime.datetime.now()
|
|
|
|
|
# print '3 ===> %ds %dms' %(now.second, now.microsecond)
|
|
|
|
|
for i in range (0, len(fit_cert_list)):
|
|
|
|
|
cert_name = fit_cert_list.pop()
|
|
|
|
|
client, Connect_Error, crypto_Error, passwd_flag, e = \
|
|
|
|
@ -461,8 +451,6 @@ def main():
|
|
|
|
|
client.set_parameters (path_to_cert, CERT_FILE, CERT_KEY)
|
|
|
|
|
|
|
|
|
|
client.port = port
|
|
|
|
|
# now = datetime.datetime.now()
|
|
|
|
|
# print '5 ===> %ds %dms' %(now.second, now.microsecond)
|
|
|
|
|
return_val = 1
|
|
|
|
|
try:
|
|
|
|
|
return_val = https_server(client, args, unknown_args, url, \
|
|
|
|
@ -477,8 +465,6 @@ def main():
|
|
|
|
|
else:
|
|
|
|
|
print e
|
|
|
|
|
return 1
|
|
|
|
|
# now = datetime.datetime.now()
|
|
|
|
|
# print 'END ===> %ds %dms' %(now.second, now.microsecond)
|
|
|
|
|
wait_thread.stop()
|
|
|
|
|
return return_val
|
|
|
|
|
#----------------------------------------------------
|
|
|
|
|