Skip to content

TOR Nodes Data Processing #1812

TOR Nodes Data Processing

TOR Nodes Data Processing #1812

Workflow file for this run

name: TOR Nodes Data Processing
on:
schedule:
- cron: '0 */2 * * *' # Runs at minute 0 every 2 hours
workflow_dispatch:
jobs:
process-data:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Requests
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run the script
run: python Lists/TOR/Get_TOR_IOCs.py
- name: List files in the root directory
run: ls -la
- name: List files in the Lists/TOR directory
run: ls -la Lists/TOR/
- name: Move output files to correct directory (if necessary)
run: |
mv TOR_nodes_list.json Lists/TOR/ || echo "File not found in root."
mv TOR_nodes_list.csv Lists/TOR/ || echo "File not found in root."
mv only_tor_exit_nodes_IP_list.csv Lists/TOR/ || echo "File not found in root."
mv only_tor_guard_nodes_IP_list.csv Lists/TOR/ || echo "File not found in root."
- name: Commit and Push Changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add Lists/TOR/TOR_nodes_list.json Lists/TOR/TOR_nodes_list.csv Lists/TOR/only_tor_exit_nodes_IP_list.csv Lists/TOR/only_tor_guard_nodes_IP_list.csv
git commit -m "Update TOR nodes list files" --allow-empty
git push