Hi

Currently i'm trying to create some Collector (McAfee Vul) using
Database connector(MS SQL Server).
Sentinel 7 with jtds-1.3.1.jar JDBC driver

Connection seems ok as show below:
[image:
https://fbcdn-sphotos-c-a.akamaihd.n...6908924_n.jpg]

But returned following error in the search:
Message: Parsing failed: TypeError: Cannot find function save.; input:
undefined

The query should be ok (Have some records although is last year
records).

I'm still unsure what is resulting that error. Any idea?

Below are the codes


Code:
--------------------
Collector.prototype.initialize = function(){
this.MAPS.sevMap = new KeyMap(this.CONFIG.collDir + "severity.map");
this.MAPS.protocolMap = new KeyMap(this.CONFIG.collDir + "protocols.map");

this.PARSER.getOffsetData = function(input) {
if (typeof input.RXMap != "undefined") {
return input.RXMap.vulnName;
}
conn.addParser(this.PARSER.getOffsetData);
}
return true;
};

Collector.prototype.cleanup = function(){
return true;
};

Connector.prototype.sendQuery = function() {
return true;
}

Record.prototype.preParse = function(e){
if (this.CONNECTION_ERROR != null || typeof this.RXMap == "undefined") { return false; }
if (this.CONNECTION_METHOD == "DATABASE"){
for (var field in this.RXMap) {
this[field] = this.RXMap[field];
}
}
return true;
};

Record.prototype.parse = function(e){
//var dt = new Date();
//e.setDeviceEventTime(dt);
this.EventName = "TEST";
return true;
};

Record.prototype.normalize = function(e){
instance.SEND_EVENT = true;
return true;
};

Record.prototype.postParse = function(e){
return true;
};

Record.prototype.reply = function(e) {
return true;
}
--------------------



Code:
--------------------
SELECT * FROM
( SELECT Top %d (row_number() over (ORDER BY Hosts.IPAddress)) as rowIndex,
VulnsTemp.Name vulnName,
VulnsTemp.Risk severity,
VulnsTemp.Description summary,
VulnsTemp.Observation description,
VulnsTemp.Recommendation solution,
VulnsTemp.CVE CVE,
VulnsTemp.BID BID,
VulnsTemp.MSFTID MSFTID,
Jobs.StartTime startTime,
Jobs.EndTime stopTime,
Hosts.OSName OS,
Hosts.IPAddress IP,
Hosts.NBName hostName,
Hosts.MACAddress macAddress,
VulnsFound.FaultlineID ModuleID,
Services.Port port,
Services.Protocol protocol
FROM VulnsTemp inner join VulnsFound on VulnsTemp.FaultlineID = VulnsFound.FaultlineID
left join Jobs on VulnsFound.JobID = Jobs.JobID
left join Hosts on VulnsFound.HostID = Hosts.HostID
left join ServicesFound on VulnsFound.HostID = ServicesFound.HostID
left join Services on ServicesFound.ServiceID = Services.ServiceID
WHERE VulnsTemp.FaultlineID = VulnsFound.FaultlineID AND
Jobs.JobID = VulnsFound.JobID AND
Hosts.HostID = VulnsFound.HostID AND
ServicesFound.HostID = Hosts.HostID AND
ServicesFound.ServiceID = Services.ServiceID AND
Jobs.State = 'Complete' AND
VulnsFound.VulnFoundID > %s
) as temp
WHERE temp.rowIndex > 0
--------------------


--
mokie
------------------------------------------------------------------------
mokie's Profile: https://forums.netiq.com/member.php?userid=6189
View this thread: https://forums.netiq.com/showthread.php?t=50701