Skip to content

Commit

Permalink
Merge pull request #13 from CommunityHoneyNetwork/tag_dev
Browse files Browse the repository at this point in the history
Handling spaces in tags field
  • Loading branch information
drewstinnett authored Jan 11, 2019
2 parents 5514a34 + bd31746 commit f507dbc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rdphoney.run.j2
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ main () {
setup_rdphoney_conf ${feeds_server} \
${feeds_server_port} \
${uid} ${secret} \
${tags} \
"${tags}" \
${debug}

exec su - rdphoney -c "python /opt/rdphoney/rdp_honeyscript.py --config /opt/rdphoney.cfg"
Expand Down
2 changes: 1 addition & 1 deletion rdphoney.sysconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ DEPLOY_KEY=
# RDPHONEY_JSON="/etc/rdphoney/rdphoney.json

# Comma separated tags for honeypot
TAGS=
TAGS=""
7 changes: 6 additions & 1 deletion rdphoney/rdp_honeyscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ def parse_config(config_file):
config['ident'] = parser.get('output_hpfeeds', 'identifier')
config['secret'] = parser.get('output_hpfeeds', 'secret')
config['debug'] = parser.get('output_hpfeeds', 'debug')
config['tags'] = parser.get('output_hpfeeds', 'tags').split(",")

try:
config['tags'] = [tag.strip() for tag in parser.get('output_hpfeeds', 'tags').split(',')]
except Exception as e:
config['tags'] = []

return config


Expand Down

0 comments on commit f507dbc

Please sign in to comment.