From d6bc5203dad9c6c473cef741a2bdecdc10f2f3f2 Mon Sep 17 00:00:00 2001 From: MDA1422 <71685940+MDA1422@users.noreply.github.com> Date: Thu, 2 Feb 2023 18:54:34 +0000 Subject: [PATCH 1/6] dnstwist --- tools/phising_attack.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/phising_attack.py b/tools/phising_attack.py index 8818607..e2eaeb0 100644 --- a/tools/phising_attack.py +++ b/tools/phising_attack.py @@ -195,6 +195,11 @@ class BlackPhish(HackingTool): def update(self): os.system("cd BlackPhish;sudo bash update.sh") +class dnstwist(HackingTool): + Title='dnstwist' + Install_commands=['sudo git clone https://github.com/elceef/dnstwist.git','cd dnstwist'] + Run_commands=['cd dnstwist;sudo python3 dnstwist.py'] + project_url='https://github.com/elceef/dnstwist' class PhishingAttackTools(HackingToolsCollection): TITLE = "Phishing attack tools" From 10a8fdbe89830795356304cb43f379e4c48f5d40 Mon Sep 17 00:00:00 2001 From: xb7 Date: Thu, 2 Feb 2023 19:37:42 +0000 Subject: [PATCH 2/6] test --- tools/phising_attack.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/phising_attack.py b/tools/phising_attack.py index e2eaeb0..d8a87f9 100644 --- a/tools/phising_attack.py +++ b/tools/phising_attack.py @@ -201,6 +201,7 @@ class dnstwist(HackingTool): Run_commands=['cd dnstwist;sudo python3 dnstwist.py'] project_url='https://github.com/elceef/dnstwist' + class PhishingAttackTools(HackingToolsCollection): TITLE = "Phishing attack tools" TOOLS = [ From e885d19f8a8c72cd17a43edf013c4ec4cb1d6619 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 4 Mar 2023 16:02:23 +0100 Subject: [PATCH 3/6] Minor fixes --- .github/workflows/lint_python.yml | 2 +- core.py | 17 ++++++++--------- generate_readme.py | 1 - hackingtool.py | 10 +++++----- tools/payload_creator.py | 3 +-- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml index 4cb86f6..fff9533 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/lint_python.yml @@ -22,7 +22,7 @@ jobs: --statistics --target-version=py37 . | grep "\[\*\]" - run: pip install black codespell mypy pytest safety - run: black --check . || true - - run: codespell # --ignore-words-list="" --skip="*.css,*.js,*.lock" + - run: codespell - run: pip install -r requirements.txt || pip install --editable . || pip install . || true - run: mkdir --parents --verbose .mypy_cache - run: mypy --ignore-missing-imports --install-types --non-interactive . || true diff --git a/core.py b/core.py index 537a716..4915660 100644 --- a/core.py +++ b/core.py @@ -1,4 +1,3 @@ -# coding=utf-8 import os import sys import webbrowser @@ -69,13 +68,13 @@ class HackingTool(object): if self.PROJECT_URL: print(f"[{98}] Open project page") print(f"[{99}] Back to {parent.TITLE if parent is not None else 'Exit'}") - option_index = input("Select an option : ") + option_index = input("Select an option : ").strip() try: option_index = int(option_index) if option_index - 1 in range(len(self.OPTIONS)): ret_code = self.OPTIONS[option_index - 1][1]() if ret_code != 99: - input("\n\nPress ENTER to continue:") + input("\n\nPress ENTER to continue:").strip() elif option_index == 98: self.show_project_page() elif option_index == 99: @@ -84,10 +83,10 @@ class HackingTool(object): return 99 except (TypeError, ValueError): print("Please enter a valid option") - input("\n\nPress ENTER to continue:") + input("\n\nPress ENTER to continue:").strip() except Exception: print_exc() - input("\n\nPress ENTER to continue:") + input("\n\nPress ENTER to continue:").strip() return self.show_options(parent = parent) def before_install(self): @@ -157,21 +156,21 @@ class HackingToolsCollection(object): for index, tool in enumerate(self.TOOLS): print(f"[{index} {tool.TITLE}") print(f"[{99}] Back to {parent.TITLE if parent is not None else 'Exit'}") - tool_index = input("Choose a tool to proceed: ") + tool_index = input("Choose a tool to proceed: ").strip() try: tool_index = int(tool_index) if tool_index in range(len(self.TOOLS)): ret_code = self.TOOLS[tool_index].show_options(parent = self) if ret_code != 99: - input("\n\nPress ENTER to continue:") + input("\n\nPress ENTER to continue:").strip() elif tool_index == 99: if parent is None: sys.exit() return 99 except (TypeError, ValueError): print("Please enter a valid option") - input("\n\nPress ENTER to continue:") + input("\n\nPress ENTER to continue:").strip() except Exception: print_exc() - input("\n\nPress ENTER to continue:") + input("\n\nPress ENTER to continue:").strip() return self.show_options(parent = parent) diff --git a/generate_readme.py b/generate_readme.py index 1b90a03..069b015 100644 --- a/generate_readme.py +++ b/generate_readme.py @@ -1,4 +1,3 @@ -# coding=utf-8 import re from core import HackingTool diff --git a/hackingtool.py b/hackingtool.py index 9753442..7626400 100755 --- a/hackingtool.py +++ b/hackingtool.py @@ -1,7 +1,7 @@ -##!/usr/bin/env python3 -# -*- coding: UTF-8 -*- +#!/usr/bin/env python3 # Version 1.1.0 import os +import sys import webbrowser from platform import system from time import sleep @@ -83,10 +83,10 @@ if __name__ == "__main__": [1] Manual [2] Default """) - choice = input("Z4nzu =>> ") + choice = input("Z4nzu =>> ").strip() if choice == "1": - inpath = input("Enter Path (with Directory Name) >> ") + inpath = input("Enter Path (with Directory Name) >> ").strip() with open(fpath, "w") as f: f.write(inpath) print("Successfully Set Path to: {}".format(inpath)) @@ -98,7 +98,7 @@ if __name__ == "__main__": sleep(3) else: print("Try Again..!!") - exit(0) + sys.exit(0) with open(fpath) as f: archive = f.readline() diff --git a/tools/payload_creator.py b/tools/payload_creator.py index 2976aa9..34ed64a 100644 --- a/tools/payload_creator.py +++ b/tools/payload_creator.py @@ -1,4 +1,3 @@ -# coding=utf-8 import os from core import HackingTool @@ -49,7 +48,7 @@ class Brutal(HackingTool): >> Arduino Software (I used v1.6.7) >> TeensyDuino >> Linux udev rules - >> Copy and paste the PaensyLib folder inside your Arduino\libraries + >> Copy and paste the PaensyLib folder inside your Arduino libraries [!] Kindly Visit below link for Installation for Arduino >> https://github.com/Screetsec/Brutal/wiki/Install-Requirements From 3fd3ce4cb36b8532b0db879d3f772558b4d24be7 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 5 Mar 2023 09:12:02 +0100 Subject: [PATCH 4/6] Dockerfile: Use pip dependency resolver Now that pip has a real dependency resolver, use it to install ALL pip dependencies in a single Docker layer. * https://pip.pypa.io/en/stable/topics/dependency-resolution * https://docs.docker.com/storage/storagedriver/#images-and-layers --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2945f20..5656a50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,14 +11,11 @@ WORKDIR /root/hackingtool COPY . . RUN true && \ -pip3 install -r requirements.txt; - -RUN true && \ -pip3 install lolcat boxes flask requests; +pip3 install boxes flask lolcat requests -r requirements.txt; RUN true && \ echo "/root/hackingtool/" > /home/hackingtoolpath.txt; EXPOSE 1-65535 -ENTRYPOINT ["python3", "/root/hackingtool/hackingtool.py"] \ No newline at end of file +ENTRYPOINT ["python3", "/root/hackingtool/hackingtool.py"] From 58b42760031e13fe05422c37563797f0e3e5e1db Mon Sep 17 00:00:00 2001 From: mit0za Date: Tue, 14 Mar 2023 17:08:02 +1030 Subject: [PATCH 5/6] removed yay because we don't need it and fixed the install script for arch based distro --- install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 install.sh diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index 3c63fc1..12afeee --- a/install.sh +++ b/install.sh @@ -71,7 +71,7 @@ if [[ $choice =~ ^[1-2]+$ ]]; then sudo apt-get install -y git python3-pip figlet boxes php curl xdotool wget -y ; elif [[ $choice == 2 ]]; then sudo pacman -Suy -y - sudo pacman -S python-pip-19.1.1-1 yay -y + sudo pacman -S python-pip -y else exit fi @@ -93,7 +93,7 @@ if [[ $choice =~ ^[1-2]+$ ]]; then if sudo git clone https://github.com/Z4nzu/hackingtool.git $install_dir; then # Install virtual environment echo -e "${YELLOW}[*] Installing Virtual Environment...${NC}" - sudo apt install python3-venv -y + #sudo apt install python3-venv -y echo ""; # Create a virtual environment for the tool echo -e "${YELLOW}[*] Creating virtual environment..." @@ -108,7 +108,8 @@ if [[ $choice =~ ^[1-2]+$ ]]; then sudo apt install figlet -y elif [[ $choice == 2 ]]; then pip3 install -r $install_dir/requirements.txt - yay -S boxes --noconfirm + sudo -u $SUDO_USER git clone https://aur.archlinux.org/boxes.git && cd boxes + sudo -u $SUDO_USER makepkg -si sudo pacman -S figlet -y fi # Create a shell script to launch the tool From e1463b4dfad8e6242450ffa26917d39aef9ce57f Mon Sep 17 00:00:00 2001 From: mit0za Date: Tue, 14 Mar 2023 17:26:59 +1030 Subject: [PATCH 6/6] removed yay and fixed the install script for arch based distro --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 12afeee..844f4e9 100755 --- a/install.sh +++ b/install.sh @@ -93,7 +93,11 @@ if [[ $choice =~ ^[1-2]+$ ]]; then if sudo git clone https://github.com/Z4nzu/hackingtool.git $install_dir; then # Install virtual environment echo -e "${YELLOW}[*] Installing Virtual Environment...${NC}" - #sudo apt install python3-venv -y + if [[ $choice == 1 ]]; then + sudo apt install python3-venv -y + elif [[ $choice == 2 ]]; then + echo "Python 3.3+ comes with a module called venv."; + fi echo ""; # Create a virtual environment for the tool echo -e "${YELLOW}[*] Creating virtual environment..."