mirror of https://github.com/cowrie/cowrie.git
parent
3a918fd971
commit
fb642455c6
|
@ -5,13 +5,16 @@
|
|||
from __future__ import division, absolute_import
|
||||
|
||||
from cowrie.shell.command import HoneyPotCommand
|
||||
from random import randint
|
||||
|
||||
HWaddr = "%02x:%02x:%02x:%02x:%02x:%02x" % (randint(0, 255), randint(0, 255), randint(0, 255), randint(0, 255), randint(0, 255), randint(0, 255))
|
||||
|
||||
commands = {}
|
||||
|
||||
class command_ifconfig(HoneyPotCommand):
|
||||
|
||||
def call(self):
|
||||
l = """eth0 Link encap:Ethernet HWaddr 04:01:16:df:2d:01
|
||||
l = """eth0 Link encap:Ethernet HWaddr %s
|
||||
inet addr:%s Bcast:%s.255 Mask:255.255.255.0
|
||||
inet6 addr: fe80::601:16ff:fedf:2d01/64 Scope:Link
|
||||
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
|
||||
|
@ -29,7 +32,7 @@ lo Link encap:Local Loopback
|
|||
TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
|
||||
collisions:0 txqueuelen:0
|
||||
RX bytes:19932 (19.9 KB) TX bytes:19932 (19.9 KB)""" % \
|
||||
(self.protocol.kippoIP,
|
||||
(HWaddr, self.protocol.kippoIP,
|
||||
self.protocol.kippoIP.rsplit('.', 1)[0])
|
||||
self.write('{0}\n'.format(l))
|
||||
|
||||
|
|
Loading…
Reference in New Issue