forked from p34709852/monkey
Added str representation of hosts.
This commit is contained in:
parent
397c4f82ca
commit
6e76162b8f
|
@ -32,6 +32,17 @@ class VictimHost(object):
|
|||
def __repr__(self):
|
||||
return "<VictimHost %s>" % (self.ip_addr, )
|
||||
|
||||
def __str__(self):
|
||||
victim = "Victim Host %s: " % self.ip_addr
|
||||
victim += "OS - ["
|
||||
for k, v in self.os.iteritems():
|
||||
victim += "%s-%s " % (k, v)
|
||||
victim += "] Services - ["
|
||||
for k, v in self.services.iteritems():
|
||||
victim += "%s-%s " % (k, v)
|
||||
victim += ']'
|
||||
return victim
|
||||
|
||||
def learn_credentials(self, username, password):
|
||||
self.cred[username.lower()] = password
|
||||
|
||||
|
|
Loading…
Reference in New Issue