Skip to content

Commit

Permalink
Updated imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteSnipers committed Jan 25, 2025
1 parent 21aefa9 commit b66420e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 3 additions & 4 deletions mpt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
from os.path import expanduser

import netifaces
from mpt import settings
from simple_term_menu import TerminalMenu

from mpt import logger

from colorama import Fore, Back, Style


HOME_FOLDER = expanduser("~")
DEFAULT_MOBILE_FOLDER = os.path.join(HOME_FOLDER, "tools/MOBILE/")
CONFIG = 'settings.json'
CONFIG_DIR = '.mpt'
CONFIG_ITEMS = {'access-point', 'application-label', 'pentest-dir', 'app', 'package-name', 'proxy', 'install-dir'}
Expand All @@ -36,7 +35,7 @@ class Config:

def __init__(self):
self.log = logger.getLogger()
config_dir = os.path.join(HOME_FOLDER, CONFIG_DIR)
config_dir = os.path.join(settings.HOME_FOLDER, CONFIG_DIR)
if not os.path.isdir(config_dir):
self.log.debug("Config directory {config_dir} does not exits")
os.makedirs(config_dir, exist_ok=True)
Expand Down Expand Up @@ -195,7 +194,7 @@ def set_tool_folder(self):

# define MOBILE_FOLDER variable and create this folder, if not exists

tool_dir = DEFAULT_MOBILE_FOLDER
tool_dir = settings.DEFAULT_MOBILE_FOLDER
self.log.info("Please set a default installation folder for tools")

use_tool_dir = self.yes_no(
Expand Down
6 changes: 4 additions & 2 deletions mpt/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
import mpt.config
from mpt.config import Config

__version__ = '0.7.49'
__version__ = '0.7.50'
HOME_FOLDER = expanduser("~")
DEFAULT_MOBILE_FOLDER = os.path.join(HOME_FOLDER, "tools/MOBILE/")
MPT_BIN = os.path.join(DEFAULT_MOBILE_FOLDER, 'bin')
MPT_PATH = os.path.dirname(os.path.realpath(__file__))
MPT_BIN = os.path.join(mpt.config.DEFAULT_MOBILE_FOLDER, 'bin')
PENTEST_FOLDER = 'pentest-' + datetime.datetime.today().strftime('%Y-%m-%d') # pentest-YYYY-MM-DD
APP_FOLDER = "app"
BACKUP_FOLDER = "backup"
Expand Down

0 comments on commit b66420e

Please sign in to comment.