Skip to content

Instantly share code, notes, and snippets.

@gomasy
Last active October 4, 2015 01:51
Show Gist options
  • Save gomasy/baa6b2f913bfeb54da1c to your computer and use it in GitHub Desktop.
Save gomasy/baa6b2f913bfeb54da1c to your computer and use it in GitHub Desktop.
patch of base.py
--- base.py.orig 2015-09-12 12:04:29.771884700 +0900
+++ base.py 2015-09-12 12:05:47.339417230 +0900
@@ -38,7 +38,10 @@
class command_echo(HoneyPotCommand):
def call(self):
- self.writeln(' '.join(self.args))
+ if len(self.args) and self.args[0].strip().count('-n'):
+ self.write(' '.join(self.args[1:]))
+ else:
+ self.writeln(' '.join(self.args))
commands['/bin/echo'] = command_echo
# for testing purposes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment