diff --git a/cowrie/commands/base.py b/cowrie/commands/base.py index 24fa4ff..a065327 100644 --- a/cowrie/commands/base.py +++ b/cowrie/commands/base.py @@ -350,7 +350,7 @@ class command_yes(HoneyPotCommand): self.writeln('y') self.scheduled = reactor.callLater(0.01, self.y) - def ctrl_c(self): + def handle_CTRL_C(self): self.scheduled.cancel() self.exit() commands['/usr/bin/yes'] = command_yes diff --git a/cowrie/commands/curl.py b/cowrie/commands/curl.py index a7cd919..cfa4420 100644 --- a/cowrie/commands/curl.py +++ b/cowrie/commands/curl.py @@ -136,7 +136,7 @@ class command_curl(HoneyPotCommand): host, port, factory, bindAddress=out_addr) return factory.deferred - def ctrl_c(self): + def handle_CTRL_C(self): self.writeln('^C') self.connection.transport.loseConnection() diff --git a/cowrie/commands/gcc.py b/cowrie/commands/gcc.py index 099b392..6a902ea 100644 --- a/cowrie/commands/gcc.py +++ b/cowrie/commands/gcc.py @@ -123,7 +123,7 @@ class command_gcc(HoneyPotCommand): else: self.no_files() - def ctrl_c(self): + def handle_CTRL_C(self): """ Make sure the scheduled call will be canceled """ if getattr(self, 'scheduled', False): diff --git a/cowrie/commands/ping.py b/cowrie/commands/ping.py index 7e7ea21..3d0bc42 100644 --- a/cowrie/commands/ping.py +++ b/cowrie/commands/ping.py @@ -63,7 +63,7 @@ class command_ping(HoneyPotCommand): self.count += 1 self.scheduled = reactor.callLater(1, self.showreply) - def ctrl_c(self): + def handle_CTRL_C(self): self.scheduled.cancel() self.writeln('--- %s ping statistics ---' % self.host) self.writeln('%d packets transmitted, %d received, 0%% packet loss, time 907ms' % \ diff --git a/cowrie/commands/wget.py b/cowrie/commands/wget.py index 8a5de10..8b90bf3 100644 --- a/cowrie/commands/wget.py +++ b/cowrie/commands/wget.py @@ -47,7 +47,7 @@ def splitthousands( s, sep=','): class command_wget(HoneyPotCommand): def start(self): try: - optlist, args = getopt.getopt(self.args, 'cO:') + optlist, args = getopt.getopt(self.args, 'cqO:') except getopt.GetoptError as err: self.writeln('Unrecognized option') self.exit() @@ -136,7 +136,7 @@ class command_wget(HoneyPotCommand): host, port, factory, bindAddress=out_addr) return factory.deferred - def ctrl_c(self): + def handle_CTRL_C(self): self.writeln('^C') self.connection.transport.loseConnection()