Skip to content

Instantly share code, notes, and snippets.

@z0rs
Last active January 17, 2025 05:08
Show Gist options
  • Save z0rs/c14bbf7a191057b40b56e3fc88a9a73d to your computer and use it in GitHub Desktop.
Save z0rs/c14bbf7a191057b40b56e3fc88a9a73d to your computer and use it in GitHub Desktop.
name: Recon
on:
push:
branches: [master]
jobs:
scan-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y wget unzip jq golang
go install github.com/cybercdh/assetfinder@cybercdh && sudo mv ~/go/bin/assetfinder /usr/bin/
go install github.com/tomnomnom/httprobe@latest && sudo mv ~/go/bin/httprobe /usr/bin/
- name: Install or Update Nuclei
run: |
# Get the latest release version dynamically
LATEST_VERSION=$(curl -s https://api.github.com/repos/projectdiscovery/nuclei/releases/latest | jq -r '.tag_name')
# Remove "v" prefix if exists
CLEAN_VERSION=${LATEST_VERSION#v}
# Download and install the latest version
wget https://github.com/projectdiscovery/nuclei/releases/download/${LATEST_VERSION}/nuclei_${CLEAN_VERSION}_linux_amd64.zip
unzip -o nuclei_${CLEAN_VERSION}_linux_amd64.zip
sudo mv nuclei /usr/bin/
sudo rm -rf nuclei* *.md
- name: Get all domains
run: |
curl -s "https://gist.githubusercontent.com/z0rs/5c99a59edb510be0302a76c86800233d/raw/a5c210cdc6be23ec2e92ba2475588d34c3f4cf3e/yacht.nl" \
| assetfinder -subs-only \
| httprobe -c 50 -t 3000 \
| sed 's/https\?:\/\///g; s/www\.//g; s/http\?:\/\///g' \
| nuclei -silent -nc -rl 3 -bs 3 -timeout 20 -retries 2 \
| tee yacht.$(date +%Y-%m-%d).txt
- name: Set up Git user
run: |
git config --global user.email "${{ secrets.EMAIL_ADDRESS }}"
git config --global user.name "${{ secrets.USER_NAME }}"
- name: Commit changes
run: |
git add .
git commit -m "Result scan $(date -u)" --no-verify
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment