开发者

Iinput information into a command prompt in python?

开发者 https://www.devze.com 2023-04-06 02:07 出处:网络
I wanted to type this into a command prompt in windows: net users Administrator * And it returns type a password in the cmd

I wanted to type this into a command prompt in windows: net users Administrator * And it returns type a password in the cmd I then want to type a password for eg:"pass" Then type it again after enter is pres开发者_运维技巧sed. How would i go about this? os.system() does not work. It goes to a new cmd each time. Any ideas?


use subprocess, you can redirect input and output of the process you created.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号