View Single Post
Old 09-24-2018, 06:21 AM
jeyro jeyro is offline
Registered User
Join Date: Sep 2018
Posts: 2
I will try to explain me. I have a main script called In this one, there is :

Step 2 :
#Connexion test
ping_serveur = -1
ping_serveur = os.system("ping " + serveur_selected)
Step 3 ( calls :
#Launch SecureCRT
SecureCRTpath = 'C:\\Users\\'+str(username1)+'\\AppData\\Local\\VanDyke Software\\SecureCRT\\SecureCRT.exe'
Scriptpath = 'C:\\Users\\'+str(username1)+'\\Documents\\PROJET\\SCRIPT\\PREPROD\\'

#Connexion CLI
subprocess.Popen(['C:\\Users\\XXXXXX\\AppData\\Local\\VanDyke Software\\SecureCRT\\SecureCRT.exe', '/SCRIPT', 'C:\\Users\\XXXXXX\\Documents\\PROJET\\SCRIPT\\PREPROD\\'])
- contains :
cmd = "/SSH2 /L %s /PASSWORD %s /C AES-128-CTR /M SHA2-256 /AUTH password,keyboard-interactive,gssapi %s" % (user, passwd, host)
Step 4 (ex: calls I want to call another script (from to execute in the active session from SecrueCRT to run others commands like (date, hostname, top, etc...), then log them. I try with the subprocess.Popen but it open a new process :/

Step 5 (ex: calls It will be a parsing from the log file to conclude.

I hope I'm clear (:
Reply With Quote