Skip to content

Commit

Permalink
Merge pull request #1 from amerck/master
Browse files Browse the repository at this point in the history
Added IP address to config options
  • Loading branch information
amerck authored Aug 6, 2018
2 parents 3e5f72d + 4840d63 commit 34ed88b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rdphoney.run.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ register() {
local json="${3:-rdphoney}"
local hostname="$(hostname -f)"
local honeypot="rdphoney"
local ip="${4:-}"

if [[ -z ${deploy_key} ]]
then
Expand All @@ -25,6 +26,7 @@ register() {
curl -s -X POST -H "Content-Type: application/json" -d "{
\"name\": \"${hostname}-${honeypot}\",
\"hostname\": \"$hostname\",
\"ip\": \"${ip}\",
\"deploy_key\": \"$deploy_key\",
\"honeypot\": \"$honeypot\"
}" ${chnserver}/api/sensor/ > ${json}
Expand Down Expand Up @@ -64,6 +66,7 @@ main () {
local feeds_server=${FEEDS_SERVER:-localhost}
local feeds_server_port=${FEEDS_SERVER_PORT:-10000}
local json=${RDPHONEY_JSON:-rdphoney.json}
local ip=${IP_ADDRESS:-}

local debug=${DEBUG:-false}

Expand All @@ -75,7 +78,7 @@ main () {

if [[ ! -f ${json} ]] || [[ ! -s ${json} ]]
then
register ${deploy_key} {$chn_server} ${json}
register ${deploy_key} {$chn_server} ${json} ${ip}

return=$?

Expand Down
4 changes: 4 additions & 0 deletions rdphoney.sysconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

DEBUG=false

# IP Address of the honeypot
# Leaving this blank will default to the docker container IP
IP_ADDRESS=

# CHN Server api to register to
CHN_SERVER="http://chnserver"

Expand Down

0 comments on commit 34ed88b

Please sign in to comment.