mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-18 14:34:22 +01:00
New command: date - thanks adnan!
git-svn-id: https://kippo.googlecode.com/svn/trunk@114 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>
|
||||
# See the COPYRIGHT file for more information
|
||||
|
||||
import os, time, anydbm
|
||||
import os, time, anydbm, datetime
|
||||
from kippo.core.honeypot import HoneyPotCommand
|
||||
from kippo.core.fs import *
|
||||
from twisted.internet import reactor
|
||||
@@ -300,6 +300,12 @@ class command_touch(HoneyPotCommand):
|
||||
self.fs.mkfile(path, 0, 0, 0, 33188)
|
||||
commands['/bin/touch'] = command_touch
|
||||
|
||||
class command_date(HoneyPotCommand):
|
||||
def call(self):
|
||||
time = datetime.datetime.utcnow();
|
||||
self.writeln(time.strftime("%a %b %d %H:%M:%S UTC %Y"))
|
||||
commands['/bin/date'] = command_date
|
||||
|
||||
class command_nop(HoneyPotCommand):
|
||||
def call(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user