Skip to content

Commit 4a2f9cd

Browse files
committed
fix issue8: set NmapProcess.summary as deprecated (see changelog)
1 parent 8aec99d commit 4a2f9cd

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

CHANGES.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
v0.4.2, 26/10/2013 -- Bug corrected: issue 8
2+
There is no guarantee that "finished" or "runstats" will be
3+
received by event parser of process.py.
4+
Summary functions are now flagged as deprecated. To use data
5+
from scan summary of numbers of hosts up, the user of the
6+
lib will have to use NmapParser.parse() and the appropriate
7+
accessors.
18
v0.4.1, 26/10/2013 -- Bug corrected: issue6
29
Infinite loop while launching several nmap scans in background
310
v0.4.0, 28/10/2013 -- Bug corrected in missing data from nmap scan output

libnmap/process.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import threading
77
from threading import Thread
88
from xml.dom import pulldom
9+
import warnings
910
try:
1011
from Queue import Queue, Empty, Full
1112
except ImportError:
@@ -423,6 +424,7 @@ def endtime(self):
423424
424425
:return: string. Unix timestamp
425426
"""
427+
warnings.warn("data collected from finished events are deprecated. Use NmapParser.parse()", DeprecationWarning)
426428
return self.__endtime
427429

428430
@property
@@ -432,6 +434,7 @@ def elapsed(self):
432434
433435
:return: string
434436
"""
437+
warnings.warn("data collected from finished events are deprecated. Use NmapParser.parse()", DeprecationWarning)
435438
return self.__elapsed
436439

437440
@property
@@ -441,6 +444,7 @@ def summary(self):
441444
442445
:return: string
443446
"""
447+
warnings.warn("data collected from finished events are deprecated. Use NmapParser.parse()", DeprecationWarning)
444448
return self.__summary
445449

446450
@property

0 commit comments

Comments
 (0)