-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.py
35 lines (26 loc) · 842 Bytes
/
Main.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
from classes.MalwareWatcher import MalwareWatcher
from classes.MalwareReverter import MalwareReverter
from classes.utils import isAdmin, printHeader
import argparse
def initArgs():
parser = argparse.ArgumentParser()
parser.add_argument("-c", "--changeFile",
help="The file that has been created by analyzing. This is used to revert "
"some changes")
args = parser.parse_args()
return args
def main(changeFile):
if not isAdmin():
input("[!] Run this as admin.")
exit()
printHeader()
if changeFile:
Mr = MalwareReverter()
Mr.revertChanges(changeFile)
else:
Mw = MalwareWatcher()
Mw.run()
input("\nPress ENTER to close...")
if __name__ == '__main__':
args = initArgs()
main(args.changeFile)