From 4271f167a43239c3d0a0d7c8c84741b027e1a959 Mon Sep 17 00:00:00 2001 From: Seb Date: Tue, 13 Aug 2019 22:48:29 -0700 Subject: [PATCH 01/18] Added load_module method to helpers --- lib/common/helpers.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/common/helpers.py b/lib/common/helpers.py index 02b2f07..7bb3415 100644 --- a/lib/common/helpers.py +++ b/lib/common/helpers.py @@ -8,6 +8,7 @@ import re import string import sys +import importlib.util # Try to find and import the settings.py config file @@ -160,3 +161,13 @@ def validate_port(port_number): return False except ValueError: return False + + +def load_module(module_path): + """ + Takes module path, return module object + """ + spec = importlib.util.spec_from_file_location(module_path, module_path) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module From f3aa67dad8fbccd5e7b63320c776262a8b72bf15 Mon Sep 17 00:00:00 2001 From: Seb Date: Tue, 13 Aug 2019 22:49:06 -0700 Subject: [PATCH 02/18] Updated module loaders to use importlib --- lib/common/orchestra.py | 6 ++---- tools/evasion/tool.py | 6 ++---- tools/ordnance/tool.py | 11 ++++------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/lib/common/orchestra.py b/lib/common/orchestra.py index 04aa2c7..6fdd106 100644 --- a/lib/common/orchestra.py +++ b/lib/common/orchestra.py @@ -3,7 +3,6 @@ """ import glob -import imp import os import readline import sys @@ -72,9 +71,8 @@ def load_tools(self, command_line_object): # (Evasion, Ordnance, Pillage, etc.) for name in glob.glob('tools/*/tool.py'): if name.endswith(".py") and ("__init__" not in name): - loaded_tool = imp.load_source( - name.replace("/", ".").rstrip('.py'), name) - self.imported_tools[name] = loaded_tool.Tools( + module = helpers.load_module(name) + self.imported_tools[name] = module.Tools( command_line_object) return diff --git a/tools/evasion/tool.py b/tools/evasion/tool.py index 0dc1c91..b0d42db 100644 --- a/tools/evasion/tool.py +++ b/tools/evasion/tool.py @@ -3,7 +3,6 @@ """ import glob -import imp import os import readline import subprocess @@ -246,9 +245,8 @@ def load_payloads(self, cli_args): for x in range(1, 5): for name in glob.glob(join("tools/evasion/payloads/" + "*/" * x,'[!_]*.py')): if name.endswith(".py") and ("__init__" not in name): - loaded_payloads = imp.load_source( - name.replace("/", ".").rstrip('.py'), name) - self.active_payloads[name.replace('tools/evasion/payloads/', '')] = loaded_payloads.PayloadModule(cli_args) + module = helpers.load_module(name) + self.active_payloads[name.replace('tools/evasion/payloads/', '')] = module.PayloadModule(cli_args) return def print_options_screen(self, pload_object): diff --git a/tools/ordnance/tool.py b/tools/ordnance/tool.py index 4944cdd..eb4e873 100644 --- a/tools/ordnance/tool.py +++ b/tools/ordnance/tool.py @@ -3,7 +3,6 @@ """ import glob -import imp import readline import sys from lib.common import helpers @@ -121,17 +120,15 @@ def cli_menu(self, invoked=False): def load_encoders(self, cli_args): for name in sorted( glob.glob('tools/ordnance/encoders/*.py') ): if name.endswith(".py") and ("__init__" not in name): - loaded_encoder = imp.load_source( - name.replace("/", ".").rstrip('.py'), name) - self.active_encoders[name] = loaded_encoder.EncoderModule(cli_args) + module = helpers.load_module(name) + self.active_encoders[name] = module.EncoderModule(cli_args) return def load_payloads(self, cli_args): for name in sorted( glob.glob('tools/ordnance/payloads/x86/*.py') ): if name.endswith(".py") and ("__init__" not in name): - loaded_payloads = imp.load_source( - name.replace("/", ".").rstrip('.py'), name) - self.active_shellcode[name] = loaded_payloads.ShellcodeModule(cli_args) + module = helpers.load_module(name) + self.active_shellcode[name] = module.ShellcodeModule(cli_args) return def print_encoders(self): From db0a3e3d1670ded57efc5b657593399c94537fe0 Mon Sep 17 00:00:00 2001 From: jgor Date: Wed, 22 Jan 2020 12:09:10 -0600 Subject: [PATCH 03/18] ensure pip 19.1.x for python 3.4.x support --- config/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/setup.sh b/config/setup.sh index 3195a61..bfce091 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -784,7 +784,7 @@ func_python_deps(){ ## Use wine based pip to install dependencies echo -e "\n\n [*] ${YELLOW}Installing (Wine) Python's PIP pefile${RESET}\n" - sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "--upgrade" "pip" + sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "--upgrade" "pip==19.1.*" tmp="$?" if [[ "${tmp}" -ne "0" ]]; then msg="Failed to run (wine) Python pip... Exit code: ${tmp}" From 227c572f21061ecfd25516a3efcc3e17c6f82da0 Mon Sep 17 00:00:00 2001 From: Ankit Das Date: Wed, 25 Mar 2020 13:00:10 +0530 Subject: [PATCH 04/18] Added Support for Manjaro --- config/setup.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/config/setup.sh b/config/setup.sh index bfce091..de925c7 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -5,6 +5,7 @@ os="$( awk -F '=' '/^ID=/ {print $2}' /etc/os-release 2>&- )" if [ "${os}" == "arch" ] \ +|| [ "${os}" == "manjaro" ]\ || [ "${os}" == "blackarch" ] \ || [ "${os}" == "debian" ] \ || [ "${os}" == "deepin" ] \ @@ -32,6 +33,18 @@ fi userprimarygroup="$( id -Gn "${trueuser}" | cut -d' ' -f1 )" arch="$( uname -m )" + +if [ "${os}" == "manjaro" ]; then + osversion="$(uname -r)" +else + osversion="$( awk -F '=' '/^VERSION_ID=/ {print $2}' /etc/os-release 2>&- | sed 's/"//g' )" +fi +if [ "${os}" == "manjaro" ]; then + osmajversion="$(uname -a | cut -f3 -d\ | cut -f-2 -d.)" +else + osmajversion="$( awk -F '["=]' '/^VERSION_ID=/ {print $3}' /etc/os-release 2>&- | cut -d'.' -f1 )" +fi + if [ "${os}" == "\"void\"" ]; then osversion="$(uname -r)" else @@ -386,7 +399,8 @@ func_package_deps(){ echo -e " ${RED}[ERROR] ${msg}${RESET}\n" fi - elif [ "${os}" == "arch" ]; then + elif [ "${os}" == "arch" ] \ + || [ "${os}" == "manjaro" ]; then AUR_packages() { if [ $1 == 'yay' ]; then @@ -589,6 +603,7 @@ func_package_deps(){ echo -e " ${RED}[ERROR] ${msg}${RESET}\n" fi elif [ "${os}" == "arch" ] \ + || [ "${os}" == "blackarch" ] \ || [ "${os}" == "blackarch" ]; then echo -e "\n\n [*] ${YELLOW}Installing Wine 32-bit on x86_64 System (via PACMAN)${RESET}\n" if grep -Fxq "#[multilib]" /etc/pacman.conf; then From 0642aa3db291a9f695678ad494bc1c86ab047867 Mon Sep 17 00:00:00 2001 From: Ankit Das Date: Wed, 25 Mar 2020 07:47:47 +0000 Subject: [PATCH 05/18] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e84a3b0..4232f16 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ The following OSs are officially supported: The following OSs are likely able to run Veil: - Arch Linux +- Manjaro Linux - BlackArch Linux - Deepin 15+ - Elementary From 2b0c17b882ab1cc6119d8fd1f6ced1d519cc1e9b Mon Sep 17 00:00:00 2001 From: Ankit Das Date: Wed, 25 Mar 2020 13:39:48 +0530 Subject: [PATCH 06/18] Added Support for Manjaro Linux --- config/setup.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/config/setup.sh b/config/setup.sh index de925c7..9a10f75 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -36,25 +36,21 @@ arch="$( uname -m )" if [ "${os}" == "manjaro" ]; then osversion="$(uname -r)" +elif [ "${os}" == "\"void\"" ]; then + osversion="$(uname -r)" else osversion="$( awk -F '=' '/^VERSION_ID=/ {print $2}' /etc/os-release 2>&- | sed 's/"//g' )" fi + if [ "${os}" == "manjaro" ]; then osmajversion="$(uname -a | cut -f3 -d\ | cut -f-2 -d.)" -else - osmajversion="$( awk -F '["=]' '/^VERSION_ID=/ {print $3}' /etc/os-release 2>&- | cut -d'.' -f1 )" -fi - -if [ "${os}" == "\"void\"" ]; then - osversion="$(uname -r)" -else - osversion="$( awk -F '=' '/^VERSION_ID=/ {print $2}' /etc/os-release 2>&- | sed 's/"//g' )" -fi -if [ "${os}" == "\"void\"" ]; then +elif [ "${os}" == "\"void\"" ]; then osmajversion="$(uname -a | cut -f3 -d\ | cut -f-2 -d.)" else - osmajversion="$( awk -F '["=]' '/^VERSION_ID=/ {print $3}' /etc/os-release 2>&- | cut -d'.' -f1 )" + osmajversion="$( awk -F '["=]' '/^VERSION_ID=/ {print $3}' /etc/os-release 2>&- | cut -d'.' -f1 )" fi + + veildir="/var/lib/veil" outputdir="${veildir}/output" dependenciesdir="${veildir}/setup-dependencies" @@ -1053,6 +1049,8 @@ else echo -e " [I] ${YELLOW}Arch Linux ${arch} detected...${RESET}\n" elif [ "${os}" == "blackarch" ]; then echo -e " [I] ${YELLOW}BlackArch Linux ${arch} detected...${RESET}\n" + elif [ "${os}" == "manjaro" ]; then + echo -e " [I] ${YELLOW}Manjaro Linux ${arch} detected...${RESET}\n" elif [ "${os}" == "debian" ]; then echo -e " [!] ${YELLOW}Debian Linux sid/TESTING ${arch} *possibly* detected..." echo -e " If you are not currently running Debian Testing, you should exit this installer!${RESET}\n" From 8ba9268b0448797f0ad508991893824b38438cf3 Mon Sep 17 00:00:00 2001 From: Christopher Truncer Date: Wed, 25 Mar 2020 13:39:00 -0600 Subject: [PATCH 07/18] Updated changelog and version --- CHANGELOG | 4 ++++ lib/common/messages.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a7ab1f4..0eea5d5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +[2020-03-25] + Released.: 3.1.13 + Modified.: Imports now use new version of imports, and updated setup script (both were pull requests) + [2019-06-17] Released.: 3.1.12 Fixed....: Pyherion including tabs in imports could cause syntax errors, tabs are now stripped only for imports diff --git a/lib/common/messages.py b/lib/common/messages.py index 10f6527..3600d51 100644 --- a/lib/common/messages.py +++ b/lib/common/messages.py @@ -15,7 +15,7 @@ sys.exit() # Current version of Veil -veil_version = "3.1.12" +veil_version = "3.1.13" def title_screen(): From 887cbe90e08f4643c63fb58afff0f31d3c957337 Mon Sep 17 00:00:00 2001 From: Christopher Truncer Date: Wed, 22 Apr 2020 20:37:37 -0600 Subject: [PATCH 08/18] Changed python syntax --- CHANGELOG | 4 ++++ lib/common/messages.py | 2 +- tools/evasion/evasion_common/outfile.py | 2 +- tools/evasion/evasion_common/shellcode_help.py | 4 ++-- tools/evasion/tool.py | 6 +++--- tools/ordnance/tool.py | 4 ++-- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0eea5d5..61e2e14 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +[2020-04-22] + Released.: 3.1.14 + Modified.: Fix for #351, it was just superficial and never stopped the tool from running, but changes "is not" to != + [2020-03-25] Released.: 3.1.13 Modified.: Imports now use new version of imports, and updated setup script (both were pull requests) diff --git a/lib/common/messages.py b/lib/common/messages.py index 3600d51..4ac5174 100644 --- a/lib/common/messages.py +++ b/lib/common/messages.py @@ -15,7 +15,7 @@ sys.exit() # Current version of Veil -veil_version = "3.1.13" +veil_version = "3.1.14" def title_screen(): diff --git a/tools/evasion/evasion_common/outfile.py b/tools/evasion/evasion_common/outfile.py index c82788d..c1c2f3b 100644 --- a/tools/evasion/evasion_common/outfile.py +++ b/tools/evasion/evasion_common/outfile.py @@ -49,7 +49,7 @@ def compiler(payload_object, invoked=False, cli_object=None): # Used when outputting exe files, go figure executable_filepath = settings.PAYLOAD_COMPILED_PATH + file_name + ".exe" - if payload_object.language is not "native" and payload_object.extension is not "war": + if payload_object.language != "native" and payload_object.extension != "war": with open(source_code_filepath, 'w') as source_file: source_file.write(payload_object.payload_source_code) diff --git a/tools/evasion/evasion_common/shellcode_help.py b/tools/evasion/evasion_common/shellcode_help.py index 16bf1f6..e7548d8 100644 --- a/tools/evasion/evasion_common/shellcode_help.py +++ b/tools/evasion/evasion_common/shellcode_help.py @@ -457,7 +457,7 @@ def menu(self): if selection != '': num_extra_options = selection.split(' ') for xtra_opt in num_extra_options: - if xtra_opt is not '': + if xtra_opt != '': if "=" not in xtra_opt: print(helpers.color(" [!] Parameter not entered in correct syntax.\n", warning=True)) continue @@ -547,7 +547,7 @@ def cli_msf_shellcode_gen(command_line_args): if command_line_args.msfoptions is not None: num_extra_options = command_line_args.msfoptions.split(' ') for xtra_opt in num_extra_options: - if xtra_opt is not '': + if xtra_opt != '': if "=" not in xtra_opt: print(helpers.color(" [!] Parameter not entered in correct syntax.\n", warning=True)) sys.exit() diff --git a/tools/evasion/tool.py b/tools/evasion/tool.py index b0d42db..e85c4a9 100644 --- a/tools/evasion/tool.py +++ b/tools/evasion/tool.py @@ -191,7 +191,7 @@ def cli_menu(self, invoked=False): # -c if self.command_options.c is not None: for payload_option in self.command_options.c: - if payload_option is not '': + if payload_option != '': if "=" not in payload_option: print(helpers.color(" [!] Payload option not entered in correct syntax.\n", warning=True)) sys.exit() @@ -415,7 +415,7 @@ def use_payload(self, selected_payload): key = key.upper() if key in selected_payload.required_options: # Validate LHOST value - if key is "LHOST": + if key == "LHOST": if helpers.validate_ip(value): selected_payload.required_options[key][0] = value else: @@ -423,7 +423,7 @@ def use_payload(self, selected_payload): print(helpers.color(" [!] ERROR: You did not provide a valid IP!", warning=True)) print() # Validate LPORT - elif key is "LPORT": + elif key == "LPORT": if helpers.validate_port(value): selected_payload.required_options[key][0] = value else: diff --git a/tools/ordnance/tool.py b/tools/ordnance/tool.py index eb4e873..a0af2d8 100644 --- a/tools/ordnance/tool.py +++ b/tools/ordnance/tool.py @@ -98,7 +98,7 @@ def cli_menu(self, invoked=False): payload.cli_gen_shellcode() self.final_shellcode = payload.customized_shellcode # Check if an encoder is being called by the user - if self.command_options.encoder is not None: + if self.command_options.encoder != None: encoder_found_here = False if "BadChars" in payload.required_options: payload.required_options["BadChars"][0] = self.command_options.bad_chars @@ -376,7 +376,7 @@ def use_payload(self, payload): self.payload_options['RHOST'] = rhost_out # Check if encoder is needed - if payload.required_options["Encoder"][0] is not "None": + if payload.required_options["Encoder"][0] != "None": self.use_encoder(payload) self.final_shellcode = payload.customized_shellcode From 4aa979e7b60ad98686160f51e1462de757b4d391 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 8 Jun 2020 16:19:32 +0200 Subject: [PATCH 09/18] xrange() was removed from Python on 1/1/2020 --- lib/common/completer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/completer.py b/lib/common/completer.py index bc7caa7..65db347 100644 --- a/lib/common/completer.py +++ b/lib/common/completer.py @@ -97,7 +97,7 @@ def complete_info(self, args): parts = name.split("/") # iterate down the split parts so we can handle the nested payload structure - for x in xrange(len(parts)): + for x in range(len(parts)): # if the first part of the iterated payload matches the language, append it if parts[x] == lang: From bf0df99f95920d50b7c47c9315244fb56d9f5c64 Mon Sep 17 00:00:00 2001 From: Ag0s <7050696+Ag0s@users.noreply.github.com> Date: Tue, 22 Dec 2020 10:09:04 +0100 Subject: [PATCH 10/18] Update for issue 394 --- tools/evasion/evasion_common/encryption.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/evasion/evasion_common/encryption.py b/tools/evasion/evasion_common/encryption.py index 9eac76a..e7c7715 100644 --- a/tools/evasion/evasion_common/encryption.py +++ b/tools/evasion/evasion_common/encryption.py @@ -18,7 +18,7 @@ def aes_encryption(incoming_shellcode, encryption_pad=4): # return encrypted -> encoded shellcode and key random_aes_key = helpers.randomKey() iv = helpers.randomString(16) - aes_cipher_object = AES.new(random_aes_key, AES.MODE_CBC, iv) + aes_cipher_object = AES.new(random_aes_key.encode('utf8'), AES.MODE_CBC, iv.encode('utf8')) padded_shellcode = encryption_padding(incoming_shellcode, encryption_pad) encrypted_shellcode = aes_cipher_object.encrypt(padded_shellcode) encoded_ciphertext = base64.b64encode(encrypted_shellcode) From 1bd6b616e2b2cf23353b2ac3f590242e167a04f6 Mon Sep 17 00:00:00 2001 From: Ankit Das Date: Tue, 29 Dec 2020 17:19:55 +0530 Subject: [PATCH 11/18] Removed duplicate code --- config/setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/config/setup.sh b/config/setup.sh index 9a10f75..1507a48 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -599,7 +599,6 @@ func_package_deps(){ echo -e " ${RED}[ERROR] ${msg}${RESET}\n" fi elif [ "${os}" == "arch" ] \ - || [ "${os}" == "blackarch" ] \ || [ "${os}" == "blackarch" ]; then echo -e "\n\n [*] ${YELLOW}Installing Wine 32-bit on x86_64 System (via PACMAN)${RESET}\n" if grep -Fxq "#[multilib]" /etc/pacman.conf; then From b33a644ccd6ec69fa4542aefa9955049a142d980 Mon Sep 17 00:00:00 2001 From: Ankit Das Date: Tue, 29 Dec 2020 17:37:14 +0530 Subject: [PATCH 12/18] Update helpers.py --- lib/common/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common/helpers.py b/lib/common/helpers.py index 7bb3415..755d379 100644 --- a/lib/common/helpers.py +++ b/lib/common/helpers.py @@ -111,14 +111,14 @@ def randomString(length=-1): if length == -1: length = random.randrange(6, 16) random_string = ''.join(random.choice(string.ascii_letters) for x in range(length)) - return random_string + return random_string.encode('utf-8') def randomKey(b=32): """ Returns a random string/key of "b" characters in length, defaults to 32 """ - return ''.join(random.choice(string.ascii_letters + string.digits + "{}!@#$^&()*&[]|,./?") for x in range(b)) + return ''.join(random.choice(string.ascii_letters + string.digits + "{}!@#$^&()*&[]|,./?") for x in range(b)).encode('utf-8') def randomNumbers(b=7): From 51102f63ff389d1bb95666e040b11df08b1a4416 Mon Sep 17 00:00:00 2001 From: anoncodeinc Date: Thu, 12 May 2022 10:01:31 -0600 Subject: [PATCH 13/18] Fix for cli processing of --msfoptions --- tools/evasion/evasion_common/shellcode_help.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/evasion/evasion_common/shellcode_help.py b/tools/evasion/evasion_common/shellcode_help.py index e7548d8..6568e4f 100644 --- a/tools/evasion/evasion_common/shellcode_help.py +++ b/tools/evasion/evasion_common/shellcode_help.py @@ -545,8 +545,7 @@ def cli_msf_shellcode_gen(command_line_args): # Parse extra flags to be included in msfvenom command extra_options = "" if command_line_args.msfoptions is not None: - num_extra_options = command_line_args.msfoptions.split(' ') - for xtra_opt in num_extra_options: + for xtra_opt in command_line_args.msfoptions: if xtra_opt != '': if "=" not in xtra_opt: print(helpers.color(" [!] Parameter not entered in correct syntax.\n", warning=True)) From f078c17e2ae9ecedc3ea0de246f0a63dc5850cc6 Mon Sep 17 00:00:00 2001 From: Christopher Truncer Date: Wed, 13 Jul 2022 14:54:17 -0600 Subject: [PATCH 14/18] Now uses correct crypto package and will install --- config/setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/setup.sh b/config/setup.sh index 1507a48..4680f5c 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -282,7 +282,7 @@ func_package_deps(){ || [ "${os}" == "kali" ] \ || [ "${os}" == "parrot" ]; then echo -e "\n\n [*] ${YELLOW}Installing Python's pycrypto (via apt)...${RESET}\n" - sudo ${arg} apt-get install -y python3-crypto + sudo ${arg} apt-get install -y pycrypto if [[ "$?" -ne "0" ]]; then msg="Failed with installing dependencies (6): $?" errors="${errors}\n${msg}" @@ -359,7 +359,7 @@ func_package_deps(){ fi sudo ${arg} apt-get install -y mingw-w64 monodevelop mono-mcs unzip ruby golang wget git \ - python python-crypto python-pefile python-pip ca-certificates python3-pip winbind python3-crypto + python pycrypto python-pefile python-pip ca-certificates python3-pip winbind if [[ "$?" -ne "0" ]]; then msg="Failed with installing dependencies (2): $?" errors="${errors}\n${msg}" @@ -370,7 +370,7 @@ func_package_deps(){ || [ "${os}" == "fedora" ] \ || [ "${os}" == "rhel" ]; then sudo ${arg} dnf -y install mingw64-binutils mingw64-cpp mingw64-gcc mingw64-gcc-c++ mono-tools-monodoc monodoc \ - monodevelop mono-tools mono-core unzip ruby golang wget git python python-crypto python-pefile \ + monodevelop mono-tools mono-core unzip ruby golang wget git python pycrypto python-pefile \ python-pip ca-certificates msttcore-fonts-installer python3-pip winbind if [[ "$?" -ne "0" ]]; then msg="Failed with installing dependencies (3): $?" @@ -380,7 +380,7 @@ func_package_deps(){ elif [ "${os}" == "blackarch" ]; then sudo pacman -Sy ${arg} --needed mingw-w64-binutils mingw-w64-crt mingw-w64-gcc mingw-w64-headers mingw-w64-winpthreads \ - mono mono-tools mono-addins python2-pip wget unzip ruby python python2 python-crypto gcc-go ca-certificates base-devel python-pip krb5 samba + mono mono-tools mono-addins python2-pip wget unzip ruby python python2 pycrypto gcc-go ca-certificates base-devel python-pip krb5 samba if [[ "$?" -ne "0" ]]; then msg="Failed with installing dependencies (4): $?" errors="${errors}\n${msg}" @@ -413,7 +413,7 @@ func_package_deps(){ fi fi } - sudo pacman -Sy ${arg} --needed mono mono-tools mono-addins python2-pip wget unzip ruby python python2 python-crypto gcc-go ca-certificates base-devel python-pip krb5 samba + sudo pacman -Sy ${arg} --needed mono mono-tools mono-addins python2-pip wget unzip ruby python python2 pycrypto gcc-go ca-certificates base-devel python-pip krb5 samba if [ $(id -u) -eq 0 ]; then echo "\n\n Insert your non-root user:\n" read $nonrootuser From a81ecb65125c69036a02e1df79748ccaec6a0fb3 Mon Sep 17 00:00:00 2001 From: Christopher Truncer Date: Wed, 13 Jul 2022 20:02:45 -0600 Subject: [PATCH 15/18] Fixed bug in setup script to install pycrypto via pip instead of apt --- config/setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/setup.sh b/config/setup.sh index 4680f5c..ff059c9 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -282,7 +282,7 @@ func_package_deps(){ || [ "${os}" == "kali" ] \ || [ "${os}" == "parrot" ]; then echo -e "\n\n [*] ${YELLOW}Installing Python's pycrypto (via apt)...${RESET}\n" - sudo ${arg} apt-get install -y pycrypto + pip3 install pycrypto if [[ "$?" -ne "0" ]]; then msg="Failed with installing dependencies (6): $?" errors="${errors}\n${msg}" @@ -359,7 +359,7 @@ func_package_deps(){ fi sudo ${arg} apt-get install -y mingw-w64 monodevelop mono-mcs unzip ruby golang wget git \ - python pycrypto python-pefile python-pip ca-certificates python3-pip winbind + python python-pefile python-pip ca-certificates python3-pip winbind if [[ "$?" -ne "0" ]]; then msg="Failed with installing dependencies (2): $?" errors="${errors}\n${msg}" @@ -370,7 +370,7 @@ func_package_deps(){ || [ "${os}" == "fedora" ] \ || [ "${os}" == "rhel" ]; then sudo ${arg} dnf -y install mingw64-binutils mingw64-cpp mingw64-gcc mingw64-gcc-c++ mono-tools-monodoc monodoc \ - monodevelop mono-tools mono-core unzip ruby golang wget git python pycrypto python-pefile \ + monodevelop mono-tools mono-core unzip ruby golang wget git python python-pefile \ python-pip ca-certificates msttcore-fonts-installer python3-pip winbind if [[ "$?" -ne "0" ]]; then msg="Failed with installing dependencies (3): $?" @@ -380,7 +380,7 @@ func_package_deps(){ elif [ "${os}" == "blackarch" ]; then sudo pacman -Sy ${arg} --needed mingw-w64-binutils mingw-w64-crt mingw-w64-gcc mingw-w64-headers mingw-w64-winpthreads \ - mono mono-tools mono-addins python2-pip wget unzip ruby python python2 pycrypto gcc-go ca-certificates base-devel python-pip krb5 samba + mono mono-tools mono-addins python2-pip wget unzip ruby python python2 gcc-go ca-certificates base-devel python-pip krb5 samba if [[ "$?" -ne "0" ]]; then msg="Failed with installing dependencies (4): $?" errors="${errors}\n${msg}" @@ -413,7 +413,7 @@ func_package_deps(){ fi fi } - sudo pacman -Sy ${arg} --needed mono mono-tools mono-addins python2-pip wget unzip ruby python python2 pycrypto gcc-go ca-certificates base-devel python-pip krb5 samba + sudo pacman -Sy ${arg} --needed mono mono-tools mono-addins python2-pip wget unzip ruby python python2 gcc-go ca-certificates base-devel python-pip krb5 samba if [ $(id -u) -eq 0 ]; then echo "\n\n Insert your non-root user:\n" read $nonrootuser From 385074d21abd12d2fdbb1c57de0d85ba18d37911 Mon Sep 17 00:00:00 2001 From: Amir Ghamari Date: Fri, 5 Aug 2022 17:22:34 +0430 Subject: [PATCH 16/18] added installation of wine for manjaro condition [ "${os}" == "manjaro" ] was missing in wine installation procedure, just added the check and installed successfully, not sure if it was intended or forgotten.i had to fix my issue somehow --- config/setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/setup.sh b/config/setup.sh index ff059c9..7d365ea 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -599,7 +599,8 @@ func_package_deps(){ echo -e " ${RED}[ERROR] ${msg}${RESET}\n" fi elif [ "${os}" == "arch" ] \ - || [ "${os}" == "blackarch" ]; then + || [ "${os}" == "blackarch" ] \ + || [ "${os}" == "manjaro" ]; then echo -e "\n\n [*] ${YELLOW}Installing Wine 32-bit on x86_64 System (via PACMAN)${RESET}\n" if grep -Fxq "#[multilib]" /etc/pacman.conf; then echo "[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf From 925dc5e09f019ecefbc22c99b6d0314cb1139432 Mon Sep 17 00:00:00 2001 From: Mike Ratcliffe Date: Thu, 8 Sep 2022 11:55:26 +0100 Subject: [PATCH 17/18] Fix Veil Installation error Failed to run (wine) Python pip pefile... Exit code: 1 This simple pull request fixes #471 #440 #475 #441 #428 Veil uses Python 3.4, but the version of pefile grabbed by pip 19 uses f-string interpolation, which was not introduced until Python 3.6. This is easily fixed by restricting the pip load of pefile to version 2019.4.18, which doesn't use f-strings. It seems like lots of people have reported the installation failure, but have been told to make this change manually. Nobody seems to have created a pull request to fix the issue, so here you are. --- config/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/setup.sh b/config/setup.sh index 7d365ea..4fa605e 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -811,7 +811,7 @@ func_python_deps(){ echo -e " ${RED}[ERROR] ${msg}${RESET}\n" fi - sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "pefile" + sudo -u "${trueuser}" WINEPREFIX="${winedir}" wine "${winedir}/drive_c/Python34/python.exe" "-m" "pip" "install" "-Iv" "pefile==2019.4.18" tmp="$?" if [[ "${tmp}" -ne "0" ]]; then msg="Failed to run (wine) Python pip pefile... Exit code: ${tmp}" From 354a7092a80535318b7f49d67046c3cd02727567 Mon Sep 17 00:00:00 2001 From: adelyi <71158320+adelyi@users.noreply.github.com> Date: Mon, 10 Oct 2022 02:06:30 +0300 Subject: [PATCH 18/18] Update setup.sh --- config/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/setup.sh b/config/setup.sh index 4fa605e..8dbf400 100755 --- a/config/setup.sh +++ b/config/setup.sh @@ -4,7 +4,7 @@ ## Global variables os="$( awk -F '=' '/^ID=/ {print $2}' /etc/os-release 2>&- )" -if [ "${os}" == "arch" ] \ +if [ "${os}" == "aarch64" ] \ || [ "${os}" == "manjaro" ]\ || [ "${os}" == "blackarch" ] \ || [ "${os}" == "debian" ] \ @@ -90,7 +90,7 @@ func_title(){ echo " os = ${os}" echo " osversion = ${osversion}" echo " osmajversion = ${osmajversion}" - echo " arch = ${arch}" + echo " arch = {aarch64}" echo " trueuser = ${trueuser}" echo " userprimarygroup = ${userprimarygroup}" echo " userhomedir = ${userhomedir}"