Skip to content

Commit 25ee4ea

Browse files
committed
changed __repr__ for NmapReport.
1 parent 6e4cd6e commit 25ee4ea

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ nosetests.xml
3939
.project
4040
.pydevproject
4141
.swp
42-
42+
examples/

libnmap/objects.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,4 +874,8 @@ def id(self):
874874
return hash(1)
875875

876876
def __repr__(self):
877-
return "{0}: {1}".format(self.__class__.__name__, self.summary)
877+
return "{0}: started at {1} hosts up {2}/{3}".format(
878+
self.__class__.__name__,
879+
self.started,
880+
self.hosts_up,
881+
self.hosts_total)

libnmap/test/files/2_hosts_achange.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
<extrareasons reason="resets" count="995"/>
2222
</extraports>
2323
<port protocol="tcp" portid="22"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="ssh" method="table" conf="3"/></port>
24+
<port protocol="tcp" portid="23"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="telnet" method="table" conf="3"/></port>
2425
<port protocol="tcp" portid="25"><state state="closed" reason="syn-ack" reason_ttl="64"/><service name="smtp" method="table" conf="3"/></port>
25-
<port protocol="tcp" portid="111"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="rpcbind" method="table" conf="3"/></port>
2626
<port protocol="tcp" portid="631"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="ipp" method="table" conf="3"/></port>
2727
<port protocol="tcp" portid="3306"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="mysql" method="table" conf="3"/></port>
2828
</ports>

0 commit comments

Comments
 (0)