diff --git a/CHANGELOG.md b/CHANGELOG.md index 1543b2e..9538c51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.5](https://github.com/jm33-m0/mec/compare/v2.3.4...v2.3.5) (2022-03-26) + + +### Bug Fixes + +* unable to start when installed via BlackArch package ([70250cc](https://github.com/jm33-m0/mec/commit/70250cc587a5e17e52a6980ee452c932581953c1)) + ### [2.3.4](https://github.com/jm33-m0/mec/compare/v2.3.3...v2.3.4) (2022-03-24) diff --git a/lib/cli/core.py b/lib/cli/core.py index 56081f8..9452cdd 100644 --- a/lib/cli/core.py +++ b/lib/cli/core.py @@ -17,7 +17,6 @@ import psutil import requests import tqdm - from lib.cli import cmd, colors, console from lib.cli import exploits as exploit_exec from lib.cli import futil @@ -26,7 +25,7 @@ MECROOT = os.path.join(os.path.expanduser("~"), ".mec") # version string, see https://github.com/googleapis/release-please/blob/f398bdffdae69772c61a82cd7158cca3478c2110/src/updaters/generic.ts#L30 -VERSION = "v2.3.4" # x-release-please-version +VERSION = "v2.3.5" # x-release-please-version class Session: @@ -96,10 +95,7 @@ def handle_config(line): except (FileNotFoundError, IndexError): self.auto_update = False finally: - try: - self.version = get_version() - except BaseException: - self.version = "UNKNOWN" + self.version = get_version() if self.auto_update: self.call_update(silent=True) diff --git a/lib/cli/main.py b/lib/cli/main.py index 60bacce..3e990b5 100644 --- a/lib/cli/main.py +++ b/lib/cli/main.py @@ -7,6 +7,7 @@ ''' import os +import shutil import sys from lib.cli import cmd, colors, console, core, futil, rlinit @@ -59,7 +60,14 @@ def run(): os.system('clear') if not os.path.isdir(core.MECROOT): - os.mkdir(core.MECROOT) + try: + # copy mec data from /usr/share, if installed via BlackArch package + shutil.copytree("/usr/share/massexpconsole", core.MECROOT) + except FileNotFoundError: + pass + except BaseException: + console.debug_except() + os.chdir(core.MECROOT) console.print_banner(ver=core.get_version(), exp_cnt=len(futil.list_exp())) @@ -68,7 +76,6 @@ def run(): console.print_error('[-] Exiting...') except FileNotFoundError: console.debug_except() - console.print_error("[-] Please run install.py first") sys.exit(1) except BaseException: console.print_error(