diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..96a3e8e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Install dependencies and run test + run: | + pip install -r requirements.txt + python -m unittest diff --git a/beacon_utils.py b/beacon_utils.py index 2102004..1e5b7ea 100644 --- a/beacon_utils.py +++ b/beacon_utils.py @@ -55,7 +55,10 @@ def get_beacon_data(url, arch): eicar_offset = buf.find(b'EICAR-STANDARD-ANTIVIRUS-TEST-FILE') if eicar_offset != -1: return buf + return decrypt_beacon(buf) + +def decrypt_beacon(buf): offset = buf.find(b'\xff\xff\xff') if offset == -1: _cli_print('[-] Unexpected buffer received') @@ -74,5 +77,4 @@ def get_beacon_data(url, arch): b = struct.unpack_from('