formatting
This commit is contained in:
committed by
=Michael Hohn
parent
96a4dcf34d
commit
8e35b1605c
34
README.org
34
README.org
@@ -1,27 +1,29 @@
|
||||
* Introduction to hepc -- HTTP End Point for CodeQL
|
||||
** Usage Sample
|
||||
#+BEGIN_SRC sh
|
||||
# Collect DBs from filesystem
|
||||
cd ~/work-gh/mrva/mrvahepc && rm -fR db-collection.tmp/
|
||||
./bin/mc-hepc-init --db_collection_dir db-collection.tmp \
|
||||
--starting_path ~/work-gh/mrva/mrva-open-source-download \
|
||||
--max_dbs 17
|
||||
# Collect DBs from filesystem
|
||||
cd ~/work-gh/mrva/mrvahepc && rm -fR db-collection.tmp/
|
||||
./bin/mc-hepc-init --db_collection_dir db-collection.tmp \
|
||||
--starting_path ~/work-gh/mrva/mrva-open-source-download \
|
||||
--max_dbs 17
|
||||
|
||||
# Serve collected DBs plus metadata
|
||||
./bin/mc-hepc-serve --codeql-db-dir db-collection.tmp
|
||||
# Serve collected DBs plus metadata
|
||||
cd ~/work-gh/mrva/mrvahepc
|
||||
. venv/bin/activate
|
||||
./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
|
||||
# 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
|
||||
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)
|
||||
echo $url
|
||||
# http://hepc/db/db-collection.tmp/aircrack-ng-aircrack-ng-ctsj-41ebbe.zip
|
||||
url=$(curl 127.0.0.1:8070/api/v1/latest_results/codeql-all \
|
||||
-o - 2>/dev/null | head -1 | jq -r .result_url)
|
||||
echo $url
|
||||
# http://hepc/db/db-collection.tmp/aircrack-ng-aircrack-ng-ctsj-41ebbe.zip
|
||||
|
||||
wget $(echo $url|sed 's|http://hepc|http://127.0.0.1:8070|g;')
|
||||
wget $(echo $url|sed 's|http://hepc|http://127.0.0.1:8070|g;')
|
||||
|
||||
#+END_SRC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user