EvilZone
Programming and Scripting => Scripting Languages => : Ragehottie February 12, 2012, 06:36:34 PM
-
I'm making a telnet-type of program. I can send and receive text fine, but I can not find how to have python export commands to CMD. I am making a kinda trojan thing to fuck with my friends. Any help would be awesome.
-
If you are going to use CMD for telnet I suggest you look into networking with python instead. But the system call will do what you want:
import os
cmd = 'ping google.com'
os.system(cmd)
-
Thank ya very kindly sir.
-
I think it'd be a better idea to use the new subprocess (http://docs.python.org/library/subprocess.html#module-subprocess) module, that way you can control input/output streams
-
In the tutorial section there is a guide on networking with python, take a look!.