2024-12-17 21:29:27 -08:00
2024-12-17 21:29:27 -08:00
2024-12-17 21:29:27 -08:00
2024-12-17 21:29:27 -08:00
2024-12-17 21:29:27 -08:00
2024-12-17 21:29:27 -08:00
2024-12-17 21:29:27 -08:00
2024-12-17 21:29:27 -08:00

Introduction to hepc HTTP End Point for CodeQL

Usage Sample

  # Collect DBs from filesystem
  cd ~/work-gh/mrva/mrvahepc
  ./bin/mc-hepc-init --db_collection_dir db-collection.tmp \
                     --starting_path ~/work-gh/mrva/mrva-open-source-download

  # Serve collected DBs plus metadata
  ./bin/mc-hepc-serve --codeql-db-dir db-collection.tmp

  # Test server
  curl 127.0.0.1:8070/index -o - 2>/dev/null | wc -l

  curl 127.0.0.1:8070/api/v1/latest_results/codeql-all \
       -o - 2>/dev/null | wc -l

  url=$(curl 127.0.0.1:8070/api/v1/latest_results/codeql-all \
             -o - 2>/dev/null | head -1 | jq -r .result_url)
  # http://hepc/db-collection.tmp/aircrack-ng-aircrack-ng-ctsj-41ebbe.zip

  wget $(echo $url|sed 's|http://hepc|http://127.0.0.1:8070|g;')

Installation

  • Set up the virtual environment and install tools

      cd ~/work-gh/mrva/mrvahepc
      python3.11 -m venv venv
      source venv/bin/activate
      pip install --upgrade pip
    
      # From requirements.txt
      pip install -r requirements.txt
      # Or explicitly
      pip install ipython
    
  • Local development

      cd ~/work-gh/mrva/mrvahepc
      source venv/bin/activate
      pip install --editable .
    

    The `editable` should use symlinks for all scripts; use `./bin/*` to be sure.

  • Full installation

    pip install mrvahepc
    

Use as library

The best way to examine the code is starting from the high-level scripts in bin/.

Description
No description provided
Readme Apache-2.0 71 KiB
Languages
Python 100%