From 08f1b06b2b9525dc7a603a088d3e0492835b56c9 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 13:15:26 +0200 Subject: [PATCH 01/13] Test install, run, uninstall --- .github/workflows/test_install.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 3a5230a..247c536 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -9,6 +9,15 @@ jobs: runs-on: ubuntu-latest env: TERM: "linux" + strategy: + fail-fast: false + matrix: + commands: + # Typing "1" will allow us to manually enter a path. + # Provide a path to a writable directory: /tmp + # Typing "99" will quit hackingtool. + - "1\n${HOME}\n99\n" # Install, run, quit + - "1\n/tmp\n17\n" # Install, run, uninstall steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -19,9 +28,6 @@ jobs: - run: pwd && ls -hal - run: sudo ./install.sh 1 - run: pwd && ls -hal - # Typing "1" will allow us to manually enter a path. - # Provide a path to a writable directory: /home/runner/work/hackingtool/hackingtool - # Typing "99" will quit hackingtool. - - run: echo -e "1\n/home/runner/work/hackingtool/hackingtool\n99\n" | hackingtool + - run: echo -e ${{ matrix.commands }} | hackingtool - run: pwd && ls -hal From 7e9f0e684b2fbe2e181ed4f328a13331009be584 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 13:23:03 +0200 Subject: [PATCH 02/13] Update test_install.yml --- .github/workflows/test_install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 247c536..291e65c 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -16,8 +16,8 @@ jobs: # Typing "1" will allow us to manually enter a path. # Provide a path to a writable directory: /tmp # Typing "99" will quit hackingtool. - - "1\n${HOME}\n99\n" # Install, run, quit - - "1\n/tmp\n17\n" # Install, run, uninstall + - "1\n${HOME}/hackingtool.config\n99\n" # Install, run, quit + - "1\n/tmp/hackingtool\n17\n" # Install, run, uninstall steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 From 2da84e1a9f12f52370a3e6178b733a0f53077c48 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 13:40:06 +0200 Subject: [PATCH 03/13] Update test_install.yml --- .github/workflows/test_install.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 291e65c..3423295 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -13,11 +13,9 @@ jobs: fail-fast: false matrix: commands: - # Typing "1" will allow us to manually enter a path. - # Provide a path to a writable directory: /tmp - # Typing "99" will quit hackingtool. - - "1\n${HOME}/hackingtool.config\n99\n" # Install, run, quit - - "1\n/tmp/hackingtool\n17\n" # Install, run, uninstall + # Enter hackingtool starting from the main menu with \n as the delimiter. + - "17" # Install, run, uninstall + - "99" # Install, run, quit steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -28,6 +26,9 @@ jobs: - run: pwd && ls -hal - run: sudo ./install.sh 1 - run: pwd && ls -hal - - run: echo -e ${{ matrix.commands }} | hackingtool + # Typing "1" will allow us to manually enter the filepath to hackingtool + # Provide the filepath ${HOME}/work/hackingtool/hackingtool + # Type the matrix.commands + - run: echo -e "1\n${HOME}/work/hackingtool/hackingtool\n${{ matrix.commands }}\n" | hackingtool - run: pwd && ls -hal From 71a599fea98a5aa8d926008c4d50edf6bc57f23a Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 16:23:12 +0200 Subject: [PATCH 04/13] 0 is update ; 1 is uninstall --- .github/workflows/test_install.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 3423295..7034ca5 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -14,7 +14,8 @@ jobs: matrix: commands: # Enter hackingtool starting from the main menu with \n as the delimiter. - - "17" # Install, run, uninstall + - "17\n0" # Install, run, update + - "17\n1" # Install, run, uninstall - "99" # Install, run, quit steps: - uses: actions/checkout@v3 From e237db09b08a838db292e3cb748aba756a9d5198 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 16:35:35 +0200 Subject: [PATCH 05/13] Press ENTER to continue --- .github/workflows/test_install.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 7034ca5..ba8c0d2 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -14,8 +14,9 @@ jobs: matrix: commands: # Enter hackingtool starting from the main menu with \n as the delimiter. - - "17\n0" # Install, run, update - - "17\n1" # Install, run, uninstall + - "17\n0\n1" # Install, run, update, update system + - "17\n0\n2" # Install, run, update, update hackingtool + - "17\n1\n" # Install, run, uninstall, press ENTER to continue - "99" # Install, run, quit steps: - uses: actions/checkout@v3 From 4947439c74dd780b9179d4fa8b4dddb3b219fffd Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 16:43:52 +0200 Subject: [PATCH 06/13] Update test_install.yml --- .github/workflows/test_install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index ba8c0d2..f26c287 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -14,9 +14,9 @@ jobs: matrix: commands: # Enter hackingtool starting from the main menu with \n as the delimiter. - - "17\n0\n1" # Install, run, update, update system - - "17\n0\n2" # Install, run, update, update hackingtool - - "17\n1\n" # Install, run, uninstall, press ENTER to continue + - "17\n0\n1\n" # Install, run, update, update system, press ENTER to continue + - "17\n0\n2\n" # Install, run, update, update hackingtool, press ENTER to continue + - '17\n1\n' # Install, run, uninstall, press ENTER to continue - "99" # Install, run, quit steps: - uses: actions/checkout@v3 From a14a6ee7b5c8f97ba18a0f965d0f9c8ab3872f3b Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 16:51:04 +0200 Subject: [PATCH 07/13] Update test_install.yml --- .github/workflows/test_install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index f26c287..70ca73e 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -14,9 +14,9 @@ jobs: matrix: commands: # Enter hackingtool starting from the main menu with \n as the delimiter. - - "17\n0\n1\n" # Install, run, update, update system, press ENTER to continue - - "17\n0\n2\n" # Install, run, update, update hackingtool, press ENTER to continue - - '17\n1\n' # Install, run, uninstall, press ENTER to continue + - "17\n0\n1\n99" # Install, run, update, update system, press ENTER to continue + - "17\n0\n2\n99" # Install, run, update, update hackingtool, press ENTER to continue + - '17\n1\n99' # Install, run, uninstall, press ENTER to continue - "99" # Install, run, quit steps: - uses: actions/checkout@v3 From abf8ebe47b869a72866c9c5c5071f458af33f591 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 17:01:22 +0200 Subject: [PATCH 08/13] Update test_install.yml --- .github/workflows/test_install.yml | 42 +++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 70ca73e..7b92ba6 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -5,19 +5,10 @@ on: push: branches: [master] jobs: - test_install: + install: runs-on: ubuntu-latest env: TERM: "linux" - strategy: - fail-fast: false - matrix: - commands: - # Enter hackingtool starting from the main menu with \n as the delimiter. - - "17\n0\n1\n99" # Install, run, update, update system, press ENTER to continue - - "17\n0\n2\n99" # Install, run, update, update hackingtool, press ENTER to continue - - '17\n1\n99' # Install, run, uninstall, press ENTER to continue - - "99" # Install, run, quit steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -30,6 +21,37 @@ jobs: - run: pwd && ls -hal # Typing "1" will allow us to manually enter the filepath to hackingtool # Provide the filepath ${HOME}/work/hackingtool/hackingtool + # Typing "99" will quit hackingtool + - run: echo -e "1\n${HOME}/work/hackingtool/hackingtool\n99\n" | hackingtool + - run: pwd && ls -hal + + test_install: + runs-on: ubuntu-latest + needs: install + env: + TERM: "linux" + strategy: + fail-fast: false + matrix: + commands: + # Enter hackingtool starting from the main menu with \n as the delimiter. + - '17\n0\n1\n\n99' # Install, run, update, update system, press ENTER to continue + - '17\n0\n2\n\n99' # Install, run, update, update hackingtool, press ENTER to continue + - '17\n1\n1\n\n99' # Install, run, uninstall, press ENTER to continue + - "99" # Install, run, quit + steps: + #- uses: actions/checkout@v3 + #- uses: actions/setup-python@v4 + # with: + # python-version: 3.x + # cache: 'pip' + #- run: pip install --upgrade pip + #- run: pwd && ls -hal + #- run: sudo ./install.sh 1 + - run: hackingtool | true + - run: pwd && ls -hal + # Typing "1" will allow us to manually enter the filepath to hackingtool + # Provide the filepath ${HOME}/work/hackingtool/hackingtool # Type the matrix.commands - run: echo -e "1\n${HOME}/work/hackingtool/hackingtool\n${{ matrix.commands }}\n" | hackingtool - run: pwd && ls -hal From 44dce8d2d2b25c8757ab71c63eb1539ddd933a4c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 17:15:38 +0200 Subject: [PATCH 09/13] Update test_install.yml --- .github/workflows/test_install.yml | 46 ++++++++---------------------- 1 file changed, 12 insertions(+), 34 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 7b92ba6..4ba35eb 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -5,10 +5,19 @@ on: push: branches: [master] jobs: - install: + test_install: runs-on: ubuntu-latest env: TERM: "linux" + strategy: + fail-fast: false + matrix: + commands: + # Enter hackingtool starting from the main menu with \n as the delimiter. + - '17\n0\n1\n\n99\n99' # Install, run, update, update system, press ENTER to continue, back to main menu, quit + - '17\n0\n2\n\n99\n99' # Install, run, update, update hackingtool, press ENTER to continue, back to main menu, quit + - '17\n1\n1\n\n99' # Install, run, uninstall, press ENTER to continue, quit + - "99" # Install, run, quit steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -19,40 +28,9 @@ jobs: - run: pwd && ls -hal - run: sudo ./install.sh 1 - run: pwd && ls -hal - # Typing "1" will allow us to manually enter the filepath to hackingtool + # Typing "1" will allow us to manually enter the filepath to hackingtool. # Provide the filepath ${HOME}/work/hackingtool/hackingtool - # Typing "99" will quit hackingtool - - run: echo -e "1\n${HOME}/work/hackingtool/hackingtool\n99\n" | hackingtool - - run: pwd && ls -hal - - test_install: - runs-on: ubuntu-latest - needs: install - env: - TERM: "linux" - strategy: - fail-fast: false - matrix: - commands: - # Enter hackingtool starting from the main menu with \n as the delimiter. - - '17\n0\n1\n\n99' # Install, run, update, update system, press ENTER to continue - - '17\n0\n2\n\n99' # Install, run, update, update hackingtool, press ENTER to continue - - '17\n1\n1\n\n99' # Install, run, uninstall, press ENTER to continue - - "99" # Install, run, quit - steps: - #- uses: actions/checkout@v3 - #- uses: actions/setup-python@v4 - # with: - # python-version: 3.x - # cache: 'pip' - #- run: pip install --upgrade pip - #- run: pwd && ls -hal - #- run: sudo ./install.sh 1 - - run: hackingtool | true - - run: pwd && ls -hal - # Typing "1" will allow us to manually enter the filepath to hackingtool - # Provide the filepath ${HOME}/work/hackingtool/hackingtool - # Type the matrix.commands + # Type the matrix.commands. - run: echo -e "1\n${HOME}/work/hackingtool/hackingtool\n${{ matrix.commands }}\n" | hackingtool - run: pwd && ls -hal From 2ecb207953d17f3bd76cd6a2c5c3327f2839bcf7 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 17:25:18 +0200 Subject: [PATCH 10/13] Update test_install.yml --- .github/workflows/test_install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 4ba35eb..8b3e418 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -14,9 +14,9 @@ jobs: matrix: commands: # Enter hackingtool starting from the main menu with \n as the delimiter. - - '17\n0\n1\n\n99\n99' # Install, run, update, update system, press ENTER to continue, back to main menu, quit - - '17\n0\n2\n\n99\n99' # Install, run, update, update hackingtool, press ENTER to continue, back to main menu, quit - - '17\n1\n1\n\n99' # Install, run, uninstall, press ENTER to continue, quit + - '17\n0\n1\n\n99\n99\n99' # Install, run, update, update system, press ENTER to continue, back to main menu, quit + - '17\n0\n2\n\n99\n99\n99' # Install, run, update, update hackingtool, press ENTER to continue, back to main menu, quit + - '17\n1\n1\n\n99\n99' # Install, run, uninstall, press ENTER to continue, quit - "99" # Install, run, quit steps: - uses: actions/checkout@v3 From 6538cee32d0f7aa7955bf17864c8e0267f7e1b25 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 18:24:38 +0200 Subject: [PATCH 11/13] Exit after hackingtool is successfully uninstalled --- tools/tool_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/tool_manager.py b/tools/tool_manager.py index f0fa2aa..79250f4 100644 --- a/tools/tool_manager.py +++ b/tools/tool_manager.py @@ -1,5 +1,6 @@ # coding=utf-8 import os +import sys from time import sleep from core import HackingTool @@ -53,9 +54,8 @@ class UninstallTool(HackingTool): "sudo rm -rf /usr/share/doc/hackingtool/;" "cd /etc/;" "sudo rm -rf /etc/hackingtool/;") - print("\nHackingtool Successfully Uninstalled..") - print("Happy Hacking..!!") - sleep(1) + print("\nHackingtool Successfully Uninstalled... Goodbye.") + sys.exit() class ToolManager(HackingToolsCollection): From 8199183e1c0e6bd97b48a8edaaf4597ae491207e Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 18:33:27 +0200 Subject: [PATCH 12/13] Update test_install.yml --- .github/workflows/test_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 8b3e418..c95aa69 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -16,7 +16,7 @@ jobs: # Enter hackingtool starting from the main menu with \n as the delimiter. - '17\n0\n1\n\n99\n99\n99' # Install, run, update, update system, press ENTER to continue, back to main menu, quit - '17\n0\n2\n\n99\n99\n99' # Install, run, update, update hackingtool, press ENTER to continue, back to main menu, quit - - '17\n1\n1\n\n99\n99' # Install, run, uninstall, press ENTER to continue, quit + # - '17\n1\n1\n' # Install, run, uninstall, press ENTER to continue - "99" # Install, run, quit steps: - uses: actions/checkout@v3 From 8b14aa5ba13daa0363fb205dae79c69c857e16c3 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 19 Jul 2023 18:50:07 +0200 Subject: [PATCH 13/13] Update test_install.yml --- .github/workflows/test_install.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index c95aa69..d752664 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -14,9 +14,9 @@ jobs: matrix: commands: # Enter hackingtool starting from the main menu with \n as the delimiter. - - '17\n0\n1\n\n99\n99\n99' # Install, run, update, update system, press ENTER to continue, back to main menu, quit - - '17\n0\n2\n\n99\n99\n99' # Install, run, update, update hackingtool, press ENTER to continue, back to main menu, quit - # - '17\n1\n1\n' # Install, run, uninstall, press ENTER to continue + - "17\n0\n1\n\n99\n99\n99" # Install, run, update, update system, press ENTER to continue, back to main menu, quit + - "17\n0\n2\n\n99\n99\n99" # Install, run, update, update hackingtool, press ENTER to continue, back to main menu, quit + # - "17\n1\n1\n" # Install, run, uninstall, press ENTER to continue - "99" # Install, run, quit steps: - uses: actions/checkout@v3