Skip to content

Commit

Permalink
Merge pull request #394 from cclauss/patch-4
Browse files Browse the repository at this point in the history
Test install, run, uninstall
  • Loading branch information
Z4nzu committed Jul 21, 2023
2 parents d725164 + 8b14aa5 commit 0232498
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ jobs:
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\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
- uses: actions/setup-python@v4
Expand All @@ -19,9 +28,9 @@ 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
# 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

6 changes: 3 additions & 3 deletions tools/tool_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
import os
import sys
from time import sleep

from core import HackingTool
Expand Down Expand Up @@ -53,9 +54,8 @@ def uninstall(self):
"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):
Expand Down

0 comments on commit 0232498

Please sign in to comment.