Express IP Updater #1783
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Express IP Updater | |
on: | |
schedule: | |
- cron: '0 */1 * * *' # Runs every 1 hours | |
workflow_dispatch: # Allows manual trigger | |
jobs: | |
update-ips: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies and zmap | |
run: | | |
python -m pip install --upgrade pip | |
pip install dnspython | |
pip install requests | |
sudo apt install zmap | |
- name: Gather ExpressVPN subnets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: python express.py | |
- name: Generate custom blocklist | |
run: python blocklist_generator.py | |
- name: Express VPN scan | |
run: sudo zmap -w express_subnet.txt -p 80 -r 128 -O csv --output-filter="success = 1" -o 'express_ips_temp.csv' -b custom_blocklist.txt | |
- name: Clean up Express VPN output | |
run: python express_vpn_cleanup.py | |
- name: Express Subnet detail Generation | |
run: python express_subnet_CSV.py | |
- name: Configure Git | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-actions[bot]" | |
- name: Commit changes | |
run: | | |
git add express_ips.csv new_express_ips.csv express_subnet.txt express_subnet.csv | |
git diff-index --quiet HEAD || git commit -m "[AUTO] update IoCs $(date '+%Y-%m-%d %H:%M:%S')" | |
- name: Push changes | |
id: push | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |