Code Monkey home page Code Monkey logo

waf-ipdb's People

Contributors

beehivecybersecurity avatar martinfrancois avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

3r9b0dy

waf-ipdb's Issues

all is correct but Authentication error

hello

this your script still working?
I have check but the script no get data

{"success":false,"errors":[{"code":10000,"message":"Authentication error"}]}

I have check with cloudflare docs

You don’t need X-Auth-Key or X-Auth-Email header if you are using an API token. There is an issue with the docs about it

and I have change with

headers = {
    "Content-Type": "application/json",
    "Authorization": f"Bearer {YOUR_API_TOKEN}"
}

and still no get data.

I have the run manually with

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "query": "query ListFirewallEvents($zoneTag: string, $filter: FirewallEventsAdaptiveFilter_InputObject) { viewer { zones(filter: { zoneTag: $zoneTag }) { firewallEventsAdaptive(filter: $filter, limit: 2500, orderBy: [datetime_DESC]) { action clientASNDescription clientAsn clientCountryName clientIP clientRequestHTTPHost clientRequestHTTPMethodName clientRequestHTTPProtocol clientRequestPath clientRequestQuery datetime rayName ruleId source userAgent } } } }",
    "variables": {
      "zoneTag": "YOUR_CLOUDFLARE_ZONE_ID",
      "filter": {
        "datetime_geq": "2024-03-19T21:16:51Z",
        "datetime_leq": "2024-03-19T23:46:51Z",
        "AND": [
          {"action_neq": "allow"},
          {"action_neq": "skip"},
          {"action_neq": "challenge_solved"},
          {"action_neq": "challenge_failed"},
          {"action_neq": "challenge_bypassed"},
          {"action_neq": "jschallenge_solved"},
          {"action_neq": "jschallenge_failed"},
          {"action_neq": "jschallenge_bypassed"},
          {"action_neq": "managed_challenge_skipped"},
          {"action_neq": "managed_challenge_non_interactive_solved"},
          {"action_neq": "managed_challenge_interactive_solved"},
          {"action_neq": "managed_challenge_bypassed"}
        ]
      }
    }
}' \
  https://api.cloudflare.com/client/v4/graphql

I got the data.

please advice

Build fails

Workflow config:
name: Report on: push: schedule: - cron: '15 * * * *' watch: types: [started] workflow_dispatch: jobs: build: if: github.repository == 'DIVISIONSolar/WAF-IPDB' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@main - name: Set up python uses: actions/setup-python@v1 with: python-version: 3.8 - name: Install requirements run: pip install -r requirements.txt - name: Report run: python main.py ${{ secrets.CLOUDFLARE_ZONE_ID }} ${{ secrets.CLOUDFLARE_EMAIL }} ${{ secrets.CLOUDFLARE_API_KEY }} ${{ secrets.ABUSEIPDB_API_KEY }}

##[debug]Evaluating condition for step: 'Report' ##[debug]Evaluating: success() ##[debug]Evaluating success: ##[debug]=> true ##[debug]Result: true ##[debug]Starting: Report ##[debug]Loading inputs ##[debug]Evaluating: format('python main.py {0} {1} {[2](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:2)} {[3](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:3)}', secrets.CLOUDFLARE_ZONE_ID, secrets.CLOUDFLARE_EMAIL, secrets.CLOUDFLARE_API_KEY, secrets.ABUSEIPDB_API_KEY) ##[debug]Evaluating format: ##[debug]..Evaluating String: ##[debug]..=> 'python main.py {0} {1} {2} {3}' ##[debug]..Evaluating Index: ##[debug]....Evaluating secrets: ##[debug]....=> Object ##[debug]....Evaluating String: ##[debug]....=> 'CLOUDFLARE_ZONE_ID' ##[debug]..=> '***' ##[debug]..Evaluating Index: ##[debug]....Evaluating secrets: ##[debug]....=> Object ##[debug]....Evaluating String: ##[debug]....=> 'CLOUDFLARE_EMAIL' ##[debug]..=> '***' ##[debug]..Evaluating Index: ##[debug]....Evaluating secrets: ##[debug]....=> Object ##[debug]....Evaluating String: ##[debug]....=> 'CLOUDFLARE_API_KEY' ##[debug]..=> '***' ##[debug]..Evaluating Index: ##[debug]....Evaluating secrets: ##[debug]....=> Object ##[debug]....Evaluating String: ##[debug]....=> 'ABUSEIPDB_API_KEY' ##[debug]..=> '***' ##[debug]=> 'python main.py *** *** *** ***' ##[debug]Result: 'python main.py *** *** *** ***' ##[debug]Loading env Run python main.py *** *** *** *** ##[debug]/usr/bin/bash -e /home/runner/work/_temp/2b103762-17ce-[4](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:4)3[5](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:5)c-a470-[6](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:6)25[7](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:7)7e070[8](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:8)2f.sh ==================== Start ==================== 2023-06-21 1[9](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:9):40:40 2023-06-21 [11](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:11):40:40 ttl: 59 <class 'dict'> Traceback (most recent call last): File "main.py", line [16](https://github.com/DIVISIONSolar/WAF-IPDB/actions/runs/5338245148/jobs/9675357089#step:5:16)4, in <module> ip_bad_list=a["data"]["viewer"]["zones"][0]["firewallEventsAdaptive"] KeyError: 'data' Error: Process completed with exit code 1. ##[debug]Finishing: Report

Any ideas on why this happens?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.