diff --git a/src/main/java/com/loafle/overflow/crawler/wmi/WMICrawlerLinux.java b/src/main/java/com/loafle/overflow/crawler/wmi/WMICrawlerLinux.java index 4c88b90..ec46255 100644 --- a/src/main/java/com/loafle/overflow/crawler/wmi/WMICrawlerLinux.java +++ b/src/main/java/com/loafle/overflow/crawler/wmi/WMICrawlerLinux.java @@ -35,10 +35,11 @@ public class WMICrawlerLinux extends WMICrawlerOS { String ip = config.getTarget().getConnection().getIp(); String query = item.getQueryInfo().getQuery(); - + String wmicPath = (String)item.getQueryInfo().getExtend().get("wmicPath"); + //FIXME:: where is wmic ?? List argList = new ArrayList(); - argList.add("/home/snoop/temp/wmic"); + argList.add(wmicPath); argList.add("-U"); argList.add(id + "%" + pw); argList.add("//" + ip); diff --git a/src/test/java/com/loafle/overflow/crawler/wmi/WMICrawlerTest.java b/src/test/java/com/loafle/overflow/crawler/wmi/WMICrawlerTest.java index fee2ad3..935518b 100644 --- a/src/test/java/com/loafle/overflow/crawler/wmi/WMICrawlerTest.java +++ b/src/test/java/com/loafle/overflow/crawler/wmi/WMICrawlerTest.java @@ -116,6 +116,7 @@ public class WMICrawlerTest { System.out.println(c); } + @Ignore @Test public void testWMIJson() throws Exception { diff --git a/src/test/resources/config/example.json b/src/test/resources/config/example.json index b5731c5..39f5150 100644 --- a/src/test/resources/config/example.json +++ b/src/test/resources/config/example.json @@ -30,7 +30,7 @@ "query": "select PercentProcessorTime, PercentIdleTime, PercentUserTime,Name from Win32_PerfFormattedData_PerfOS_Processor", "extend" : { "nameSpace":"root/cimv2", - "wmicPath": "" + "wmicPath": "/home/snoop/temp/wmic" } }, "mappingInfo" : { @@ -49,7 +49,7 @@ "query": "select PercentProcessorTime, PercentIdleTime, PercentUserTime,Name from Win32_PerfFormattedData_PerfOS_Processor where Name='_Total'", "extend" : { "nameSpace":"root/cimv2", - "wmicPath": "" + "wmicPath": "/home/snoop/temp/wmic" } }, "mappingInfo" : {