Skip to content

Commit b31a150

Browse files
committed
FIXED -- Added Serialization and Plugin support (v0.2.0):
- added serialization encoders and decoders for NmapReport - added basic plugin capability to NmapReport - added basic mongodb plugin to validate plugin setup TODO: - Add Sphinx DocStrings - NmapParser should be able to be fully generic and return Objects - NmapParser should not need a XML root - Add new plugins to support import/export from mysql, couchdb, csv - support iterators for NmapReport::scanned_hosts - add support for parsing os version (fingerprint) - add unittest for udp scans, ping sweeping - add support for 'resume' capability (see nmap --resume) - review thread management for NmapProcess
1 parent c29d675 commit b31a150

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v0.2.0, 18/04/2013 -- Added Serialization and Plugin support
2+
- added serialization encoders and decoders for NmapReport
3+
- added basic plugin capability to NmapReport
4+
- added basic mongodb plugin to validate plugin setup
15
v0.1.5, 08/04/2013 -- Refactory of NmapDiff system
26
- rework of NmapHost and NmapService API
37
- added __hash__, id and get_dict() for common Nmap

TODO

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
- Add Sphinx DocStrings
22
- NmapParser should be able to be fully generic and return Objects
33
- NmapParser should not need a XML root
4-
- NmapReport export(), import() should support plugins for csv (multi-format) mongodb, mysql, ...
4+
- Add new plugins to support import/export from mysql, couchdb, csv
55
- support iterators for NmapReport::scanned_hosts
6-
- refactory NmapHost() constructor
7-
- add support for parsing os version and banner of port
8-
- expose a clear API for NmapHost, NmapService and NmapParser
9-
- add support for 'resume' capability
6+
- add support for parsing os version (fingerprint)
7+
- add unittest for udp scans, ping sweeping
8+
- add support for 'resume' capability (see nmap --resume)
109
- review thread management for NmapProcess

libnmap/report.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
import inspect
55
import importlib
66
from libnmap import NmapParser, NmapParserException, NmapDiff, NmapHost, NmapService
7-
## TODO: del/add_host()
8-
# add/del_service()
7+
98
class NmapReport(object):
109
def __init__(self, name='', raw_data=None):
1110
self._name = name
@@ -42,15 +41,6 @@ def db(self, plugin_name="mongodb", **kwargs):
4241
r = classobj(**kwargs)
4342
return r
4443

45-
# def dbinsert(self, plugin='mongodb'):
46-
# if plugin == 'mongodb':
47-
# from libnmap.plugins.mongodb import NmapMongoPlugin
48-
# db = NmapMongoPlugin()
49-
# jser = json.dumps(self, cls=ReportEncoder)
50-
# db.data_add(json.loads(jser))
51-
# except:
52-
# raise Exception("DB plugin {0} not available")
53-
5444
def diff(self, other):
5545
if self._is_consistent() and other._is_consistent():
5646
r = NmapDiff(self, other)
@@ -120,7 +110,6 @@ def get_dict(self):
120110
'hosts_total': self.hosts_total})
121111
return d
122112

123-
# dummy return value: report have no unique id, all could be compared
124113
@property
125114
def id(self):
126115
return hash(1)

0 commit comments

Comments
 (0)