mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-01-18 13:44:23 +01:00
rename ctrl_c to handle_CTRL_C
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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' % \
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user