mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-28 11:24:20 +01:00
1
honeyfs/etc/hostname
Normal file
1
honeyfs/etc/hostname
Normal file
@@ -0,0 +1 @@
|
||||
svr03
|
||||
@@ -17,8 +17,8 @@ ssh_port = 2222
|
||||
# Hostname for the honeypot. Displayed by the shell prompt of the virtual
|
||||
# environment.
|
||||
#
|
||||
# (default: nas3)
|
||||
hostname = nas3
|
||||
# (default: svr03)
|
||||
hostname = svr03
|
||||
|
||||
# Directory where to save log files in.
|
||||
#
|
||||
|
||||
@@ -137,11 +137,11 @@ class HoneyPotShell(object):
|
||||
self.runCommand()
|
||||
|
||||
def showPrompt(self):
|
||||
# Example: nas3:~#
|
||||
# Example: svr03:~#
|
||||
#prompt = '%s:%%(path)s' % self.honeypot.hostname
|
||||
# Example: root@nas3:~# (More of a "Debianu" feel)
|
||||
# Example: root@svr03:~# (More of a "Debianu" feel)
|
||||
prompt = '%s@%s:%%(path)s' % (self.honeypot.user.username, self.honeypot.hostname,)
|
||||
# Example: [root@nas3 ~]# (More of a "CentOS" feel)
|
||||
# Example: [root@svr03 ~]# (More of a "CentOS" feel)
|
||||
#prompt = '[%s@%s %%(path)s]' % (self.honeypot.user.username, self.honeypot.hostname,)
|
||||
if not self.honeypot.user.uid:
|
||||
prompt += '# ' # "Root" user
|
||||
@@ -156,7 +156,7 @@ class HoneyPotShell(object):
|
||||
path[:(homelen+1)] == self.honeypot.user.home + '/':
|
||||
path = '~' + path[homelen:]
|
||||
# Uncomment the three lines below for a 'better' CenOS look.
|
||||
# Rather than '[root@nas3 /var/log]#' is shows '[root@nas3 log]#'.
|
||||
# Rather than '[root@svr03 /var/log]#' is shows '[root@svr03 log]#'.
|
||||
#path = path.rsplit('/', 1)[-1]
|
||||
#if not path:
|
||||
# path = '/'
|
||||
|
||||
Reference in New Issue
Block a user