forked from p15670423/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):
|
def __repr__(self):
|
||||||
return "<VictimHost %s>" % (self.ip_addr, )
|
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):
|
def learn_credentials(self, username, password):
|
||||||
self.cred[username.lower()] = password
|
self.cred[username.lower()] = password
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue