A) Create keylogger using python.
Step 1: Open Anaconda, Install pynput.
Step 2: Code
Step 1: #import the module in your python shell
Step 2: import the required packages and method.
#To monitor the keyboard, use the key and listener method of pynput.keyboard module
Step 3: #set the path where we are going to store our log files, in what mode logs will be store andthe format.
Step 4: Write the function on press that contains a definition for keypresses and take the key asa parameter.
Step 5: Set up an instance of Listener and define the on-press method in it and then join the instance to the main thread.
with Listener(on_press=my_key_on_press) as listener: listener.join()
B) Create Virus
Code:
Step 1: Right click on desktop or any drive
Step 2: Select create new shortcut and type
shutdown -s -t 50 -c “Shutdown the machine”