-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmsd.py
executable file
·126 lines (98 loc) · 4.59 KB
/
msd.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
"""
#####
#MSD#
#####
MSD(Malware Sample Downloader) was created with the intention of making downloading malware samples less of a hassle for malware analysts and researchers. With this script, you will be able to download malware samples directly from your terminal! 😊
(This script is still a WIP other sites and features will be added in the future.)
"""
creator = """
https://github.com/L0WK3Y-IAAN
______ _ _____ _ _ _ __ _______ __
| ___ \ | | | _ || | | | | / /|____ \ \ / /
| |_/ /_ _ | | | |/' || | | | |/ / / /\ V /
| ___ \ | | | | | | /| || |/\| | \ \ \ \ /
| |_/ / |_| |_ | |___\ |_/ /\ /\ / |\ \.___/ / | |
\____/ \__, (_) \_____/\___/ \/ \/\_| \_/\____/ \_/
__/ |
|___/
"""
program = """
_______ _______ ______
( )( ____ \( __ \
| () () || ( \/| ( \ )
| || || || (_____ | | ) |
| |(_)| |(_____ )| | | |
| | | | ) || | ) |
| ) ( |/\____) || (__/ )
|/ \|\_______)(______/
_ _______ _
_dMMMb._ .adOOOOOOOOOba. _,dMMMb_
dP' ~YMMb dOOOOOOOOOOOOOOOb aMMP~ `Yb
V ~"Mb dOOOOOOOOOOOOOOOOOb dM"~ V
`Mb. dOOOOOOOOOOOOOOOOOOOb ,dM'
`YMb._ |OOOOOOOOOOOOOOOOOOOOO| _,dMP'
__ `YMMM| OP'~"YOOOOOOOOOOOP"~`YO |MMMP' __
,dMMMb. ~~' OO `YOOOOOP' OO `~~ ,dMMMb.
_,dP~ `YMba_ OOb `OOO' dOO _aMMP' ~Yb._
`YMMMM\`OOOo OOO oOOO'/MMMMP'
,aa. `~YMMb `OOOb._,dOOOb._,dOOO'dMMP~' ,aa.
,dMYYMba._ `OOOOOOOOOOOOOOOOO' _,adMYYMb.
,MP' `YMMba._ OOOOOOOOOOOOOOOOO _,adMMP' `YM.
MP' ~YMMMba._ YOOOOPVVVVVYOOOOP _,adMMMMP~ `YM
YMb ~YMMMM\`OOOOI`````IOOOOO'/MMMMP~ dMP
`Mb. `YMMMb`OOOI,,,,,IOOOO'dMMMP' ,dM'
`' `OObNNNNNdOO' `'
`~OOOOO~' TISSUE
"""
program2="""
_______ _______ ______
( )( ____ \( __ \
| () () || ( \/| ( \ )
| || || || (_____ | | ) |
| |(_)| |(_____ )| | | |
| | | | ) || | ) |
| ) ( |/\____) || (__/ )
|/ \|\_______)(______/
"""
import os
import time
import requests
from bs4 import BeautifulSoup
try:
print(creator)
time.sleep(2)
os.system('cls' if os.name == 'nt' else 'clear')
print(program)
time.sleep(2)
os.system('cls' if os.name == 'nt' else 'clear')
print(program2)
siteSelection = input("Select a site that you would like to download samples from...\n\n1: dasmalwerk.eu\n\n\n\nSelection: ")
os.system('cls' if os.name == 'nt' else 'clear')
if siteSelection == '1':
file_url = "https://das-malwerk.herokuapp.com/"
req = requests.get(file_url)
with open("dasmalwerk.html", "wb") as html:
html.write(req.content)
soup = BeautifulSoup(req.content, 'html.parser')
tableBody = soup.find_all('tbody')
for table in tableBody:
for block in table:
title = str(block.find('td'))
links = str(block.find('a')).replace('<a href=','').replace('"','')
sep = '>'
downloadLink = links.split(sep, 1)[0]
print(title.replace('-1','').replace('<td>','').replace('</td>',''), "\n\n", downloadLink)
URLdownload = input("\n\n\nSelect a URL, copy and paste it here to download: ")
if True:
def download_url():
req = requests.get(URLdownload, stream=True)
with open("file.zip", "wb") as file:
file.write(req.content)
print("File downloaded successfully.")
os.remove("./dasmalwerk.html")
download_url()
except KeyboardInterrupt:
os.system('cls' if os.name == 'nt' else 'clear')
print('\nProgram Terminated...Exiting.')
time.sleep(2)
os.system('cls' if os.name == 'nt' else 'clear')