diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..06b7d86 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: D4N155 CI + +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + +jobs: + test: + name: Tests & Quality + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install pytest pytest-asyncio bandit pip-audit + + - name: Install lxml system deps + run: sudo apt-get install -y libxml2-dev libxslt1-dev + + - name: Run unit tests + run: pytest tests/ -v --tb=short + + - name: Security analysis (Bandit) + run: bandit -r modules/ -ll --skip B603,B607 + + - name: Dependency vulnerability scan (pip-audit) + run: pip-audit -r requirements.txt + + shellcheck: + name: ShellCheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run ShellCheck on bash files + uses: ludeeus/action-shellcheck@master + with: + scandir: "." + additional_files: "main modules/functions.sh modules/load.sh" diff --git a/main b/main old mode 100755 new mode 100644 index 7f3f267..145a9d0 --- a/main +++ b/main @@ -1,204 +1,109 @@ #!/usr/bin/env bash +# main — D4N155 Improved +# Compatível com a interface original. Integra os módulos Python otimizados. +# GoMutation preservado — compilado e chamado via modules/wordlist.py. -# Fix problems of directories -here=`dirname "$0"` -cd "$here" - -# colors art -. ./modules/colors.sh -# Banner -echo -e """ -$red /\ o - o /_ /~/ - \ /\/ - \ / - \ / - .{{}}}}}}. - {{{{{}}}}}}}. - {{{{ {}{{}}}} - }}}}} - - {{{{{ - }}}} 0 0 }}}& - {{{{{---~^~---{{{& - }}}}}}\ ☭ /}}&&& - {{{{{{{;._ .;}}&&&& - '{{{{{{) \_(}}|//& - ´''''': :''''´ - [ \e[5m$bgred\033[38;5;232mOWASP D4N155$end $red] -""" - -# ignore lower and uppercase -shopt -s nocasematch -# and colors with dont fuck terminal -printf "$end" -# Vars -export aggressive="0" -bug=""" - You can report new bug or open a issue - \t$yellow→ $orange https://github.com/owasp/D4N155/issues$end -""" -help=""" - Or use the Telegram bot https://t.me/D4N155_bot - D4N155: Tool for smart audit security - - Usage: bash main