· 9 years ago · Nov 19, 2016, 01:26 AM
1./3rdpartyscript -u username -p password -flag 123
2
3./folder/3rdpartyscript -u username -p password -flag 123
4OR
5/folder/3rdpartyscript -u username -p password -flag 123
6
76 def getCreds():
8 7 global access_key, secret_key, yourName
9 8 access_key = raw_input("Enter User Name: ")
10 9 secret_key = raw_input("Enter Password: ")
11 10 infoCorrect = raw_input('Is this information correct? (y or n)')
12 11 if infoCorrect.lower() == "yes" or infoCorrect.lower() =="y":
13 12 p = subprocess.Popen("./3rdPartyScript -u %s -p %s -flag 123" % (access_key, secret_key), shell=True, stdout = subprocess.PIPE)
14 13 output,err = p.communicate()
15 14 print(output)
16
17I'll take the result of "output" and eventually put it against some kinda decision.
18
19 17 else:
20 18 print "n Couldn't connect to please check your credentials n"
21 19
22 21
23 22 getCreds()