-
-
Save ambalabanov/5a3fe80e355cd9484e9259d19e833bbb to your computer and use it in GitHub Desktop.
MHN registration
This file contains hidden or 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
| curl $server_url/static/dionaea.conf | |
| curl $server_url/api/sensor/ > /tmp/deploy.json | |
| wget $server_url/static/registration.txt -O registration.sh | |
| chmod 755 registration.sh | |
| # hpfeeds info | |
| export HPF_HOST=$(echo $server_url | sed 's#^http://##; s#^https://##; s#/.*$##; s/:.*$//') | |
| export HPF_PORT="10000" | |
| export HPF_IDENT=$(python -c 'import json;obj=json.load(file("/tmp/deploy.json"));print obj["identifier"]') | |
| export HPF_SECRET=$(python -c 'import json;obj=json.load(file("/tmp/deploy.json"));print obj["secret"]') | |
| hpfeeds = { | |
| + hp1 = { | |
| + server = "$HPF_HOST" | |
| + port = "$HPF_PORT" | |
| + ident = "$HPF_IDENT" | |
| + secret = "$HPF_SECRET" | |
| + // dynip_resolve: enable to lookup the sensor ip through a webservice | |
| + dynip_resolve = "http://queryip.net/ip/" | |
| + } | |
| + } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment