Merge pull request #113 from g0tmi1k/hostname

Changed default hostname
This commit is contained in:
desaster
2014-06-01 21:30:11 +03:00
3 changed files with 7 additions and 6 deletions

1
honeyfs/etc/hostname Normal file
View File

@@ -0,0 +1 @@
svr03

View File

@@ -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.
#

View File

@@ -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 = '/'