Skip to content

Instantly share code, notes, and snippets.

@ambalabanov
Last active April 12, 2021 16:47
Show Gist options
  • Select an option

  • Save ambalabanov/5a3fe80e355cd9484e9259d19e833bbb to your computer and use it in GitHub Desktop.

Select an option

Save ambalabanov/5a3fe80e355cd9484e9259d19e833bbb to your computer and use it in GitHub Desktop.
MHN registration
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