diff --git a/install/requirements.txt b/install/requirements.txt index 3bb0125..0831050 100644 --- a/install/requirements.txt +++ b/install/requirements.txt @@ -1,8 +1,7 @@ mysqlclient -mongoengine django werkzeug -distorm3 +capstone httplib2 oauth2client google-api-python-client diff --git a/server/first_core/engines/basic_masking.py b/server/first_core/engines/basic_masking.py index f166f7f..46c88cd 100644 --- a/server/first_core/engines/basic_masking.py +++ b/server/first_core/engines/basic_masking.py @@ -146,17 +146,11 @@ def normalize(self, disassembly): normalized.append(instr + ', '.join(operand_instrs)) ''' - print 'Original' - print original - print 'Normalized' - print [x.encode('hex') for x in normalized] - if MIN_REQUIRED_INSTRUCTIONS > len(normalized): print 145 return (0, None) h_sha256 = sha256(''.join(normalized)).hexdigest() - print (changed_bytes, h_sha256) return (changed_bytes, h_sha256) except Exception as e: @@ -176,7 +170,6 @@ def _add(self, function): if not h_sha256: return - try: db_obj = BasicMasking.objects.get(sha256=h_sha256, architecture=architecture) diff --git a/server/utilities/user_shell.py b/server/utilities/user_shell.py index a10ad27..c472eab 100644 --- a/server/utilities/user_shell.py +++ b/server/utilities/user_shell.py @@ -1,7 +1,7 @@ #! /usr/bin/python #------------------------------------------------------------------------------- # -# Utility Shell to manage Engine related operations +# Utility Shell to manage User related operations # Copyright (C) 2016 Angel M. Villegas # # This program is free software; you can redistribute it and/or modify @@ -34,15 +34,13 @@ # FIRST Modules import first.wsgi import first.settings -from first_core.engines import AbstractEngine from first_core.disassembly import Disassembly -from first_core import DBManager, EngineManager -from first_core.models import Engine, User, Function +from first_core.models import User # Third Party Modules from django.core.paginator import Paginator -class EngineCmd(Cmd): +class UserCmd(Cmd): def __init__(self): Cmd.__init__(self) @@ -60,10 +58,10 @@ def preloop(self): '+========================================================+\n' '| FIRST User Shell Menu |\n' '+========================================================+\n' - '| list | List all engines currently installed |\n' - '| info | Get info on an engine |\n' + '| list | List all users currently installed |\n' + '| info | Get info on an user |\n' '| adduser | Registers a user manually |\n' - '| enable | Enable engine (Engine will be enabled) |\n' + '| enable | Enable user |\n' '| disable | Disable user account |\n' '+--------------------------------------------------------+\n') @@ -88,7 +86,7 @@ def do_shell(self, line): '''Run line in python''' exec line -class RootCmd(EngineCmd): +class RootCmd(UserCmd): def do_list(self, line): print 'list - List all registered users' if line in ['help', '?']: @@ -166,7 +164,7 @@ def do_info(self, line): '| Created | {1:53} |\n' '+' + '-'*9 + '+' + '-'*55 + '\n' '| Active | {0.active:53} |\n' - '+' + '-'*69 + '+\n').format(user, str(user.created)) + '+' + '-'*65 + '+\n').format(user, str(user.created)) def do_enable(self, line): print 'enable - Enable user \n'