command input splits after each letter python remote control program
Question: I am working on a backdoor program for remote operations over my PC's at home.
The server connects fine but I have a problem in executing the commands as the
letters split up as a new command for each alphabet typed... Something like
when I type 'echo', the results print something as 'e' is not recognized as an
internal or external command and blah blah. then comes: 'c' is not recognized
etc. etc.

Got my point???

How do I make this work that when I type echo it waits for the complete
command

Here is the code:

    
    
    import socket
    import subprocess
    s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
    s.bind((ipadd_of_pc_running_this_appl,12345))
    s.listen(3) #ignore this plz..i will change this later
    cli,addr=s.accept()
    while 1:
        data=cli.recv(1024)
        if data:
            data=data.decode() #string type conversion
            proc=subprocess.Popen(data,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
            output=proc.stdout.readline()+proc.stderr.readline()
            cli.send(output)
    

Btw I want to use telent or similar to connect to it plz thanks in advance
sorry about the recv_into...i forgot to change it recv thanks

**NOTE: The problem isn't solved yet. I copied and pasted content from my
other file [minute changes ;)]. Now the code is edited. Kindly help me out**


Answer: Popen expects a list of arguments, so try this:

    
    
     Popen([data], 
    

