diff --git a/malware-db.py b/malware-db.py index cb13a55..b7be348 100644 --- a/malware-db.py +++ b/malware-db.py @@ -18,6 +18,7 @@ import sys import getopt +import os import inspect import subprocess import csv @@ -25,7 +26,7 @@ import csv def main(): # Set general variables. - version=0.1 + version='0.1 Alpha' appname="Malware DB" authors="Yuval Nativ, Lahad Ludar, 5fingers" licensev="GPL v3.0" @@ -43,16 +44,24 @@ def main(): column_for_version=4 column_for_name=3 column_for_uid=0 + eula_file='eula_run.conf' def print_license(): print "" print fulllicense print "" + def check_eula_file(): + try: + with open(eula_file): + return 1 + except IOError: + return 0 + def versionbanner(): print "" print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - print "\t\t " + appname + print "\t\t " + appname + ' v' + version print "Built by:\t\t" + authors print "Is licensed under:\t" + licensev print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" @@ -93,6 +102,29 @@ def main(): new ="" update=0 m=[]; + a=0 + eula_answer='no' + + # Checking for EULA Agreement + a = check_eula_file() + if a == 0: + print appname + ' v' + version + print 'This program contain live and dangerous malware files' + print 'This program is intended to be used only for malware analysis and research' + print 'and by agreeing the EULA you agree to only use it for legal purposes and ' + print 'studying malware.' + print 'You understand that these file are dangerous and should only be run on VMs' + print 'you can control and know how to handle. Running them on a live system will' + print 'infect you machines will live and dangerous malwares!.' + print '' + eula_answer = raw_input('Type YES in captial letters to accept this EULA.\n') + if eula_answer == 'YES': + print 'you types YES' + new = open(eula_file, 'a') + new.write(eula_answer) + else: + print 'You need to accept the EULA.\nExiting the program.' + sys.exit(1) # Get arguments for opt, arg in options: