EvilZone
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
EvilZone
»
Programming and Scripting
»
Scripting Languages
(Moderator:
RedBullAddicted
) »
[Python] Control CMD with python?
Print
Pages: [
1
]
Author
Topic: [Python] Control CMD with python? (Read 1594 times)
0 Members and 1 Guest are viewing this topic.
Ragehottie
Knight
Posts: 313
Cookies: -9
Hack to learn, not learn to hack.
[Python] Control CMD with python?
«
on:
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.
Report to moderator
Logged
Blog: rexmckinnon.tumblr.com
ande
Owner
Titan
Posts: 2664
Cookies: 256
Re: [Python] Control CMD with python?
«
Reply #1 on:
February 12, 2012, 06:54:34 pm »
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:
Code:
[Select]
import os
cmd = 'ping google.com'
os.system(cmd)
«
Last Edit: February 12, 2012, 06:54:57 pm by ande
»
Report to moderator
Logged
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true
Ragehottie
Knight
Posts: 313
Cookies: -9
Hack to learn, not learn to hack.
Re: [Python] Control CMD with python?
«
Reply #2 on:
February 13, 2012, 01:04:07 am »
Thank ya very kindly sir.
Report to moderator
Logged
Blog: rexmckinnon.tumblr.com
xeross
NULL
Posts: 2
Cookies: 0
Re: [Python] Control CMD with python?
«
Reply #3 on:
February 14, 2012, 12:22:32 pm »
I think it'd be a better idea to use the new
subprocess
module, that way you can control input/output streams
Report to moderator
Logged
Stackprotector
Administrator
Titan
Posts: 2515
Cookies: 205
Re: [Python] Control CMD with python?
«
Reply #4 on:
February 16, 2012, 05:37:33 pm »
In the tutorial section there is a guide on networking with python, take a look!.
Report to moderator
Logged
~Factionwars
Print
Pages: [
1
]
EvilZone
»
Programming and Scripting
»
Scripting Languages
(Moderator:
RedBullAddicted
) »
[Python] Control CMD with python?