fix
wmic path in json
This commit is contained in:
parent
275d1e907f
commit
d3da1158ea
|
@ -35,10 +35,11 @@ public class WMICrawlerLinux extends WMICrawlerOS {
|
||||||
String ip = config.getTarget().getConnection().getIp();
|
String ip = config.getTarget().getConnection().getIp();
|
||||||
String query = item.getQueryInfo().getQuery();
|
String query = item.getQueryInfo().getQuery();
|
||||||
|
|
||||||
|
String wmicPath = (String)item.getQueryInfo().getExtend().get("wmicPath");
|
||||||
|
//FIXME:: where is wmic ??
|
||||||
List<String> argList = new ArrayList<String>();
|
List<String> argList = new ArrayList<String>();
|
||||||
|
|
||||||
argList.add("/home/snoop/temp/wmic");
|
argList.add(wmicPath);
|
||||||
argList.add("-U");
|
argList.add("-U");
|
||||||
argList.add(id + "%" + pw);
|
argList.add(id + "%" + pw);
|
||||||
argList.add("//" + ip);
|
argList.add("//" + ip);
|
||||||
|
|
|
@ -116,6 +116,7 @@ public class WMICrawlerTest {
|
||||||
System.out.println(c);
|
System.out.println(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore
|
||||||
@Test
|
@Test
|
||||||
public void testWMIJson() throws Exception {
|
public void testWMIJson() throws Exception {
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
"query": "select PercentProcessorTime, PercentIdleTime, PercentUserTime,Name from Win32_PerfFormattedData_PerfOS_Processor",
|
"query": "select PercentProcessorTime, PercentIdleTime, PercentUserTime,Name from Win32_PerfFormattedData_PerfOS_Processor",
|
||||||
"extend" : {
|
"extend" : {
|
||||||
"nameSpace":"root/cimv2",
|
"nameSpace":"root/cimv2",
|
||||||
"wmicPath": ""
|
"wmicPath": "/home/snoop/temp/wmic"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mappingInfo" : {
|
"mappingInfo" : {
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
"query": "select PercentProcessorTime, PercentIdleTime, PercentUserTime,Name from Win32_PerfFormattedData_PerfOS_Processor where Name='_Total'",
|
"query": "select PercentProcessorTime, PercentIdleTime, PercentUserTime,Name from Win32_PerfFormattedData_PerfOS_Processor where Name='_Total'",
|
||||||
"extend" : {
|
"extend" : {
|
||||||
"nameSpace":"root/cimv2",
|
"nameSpace":"root/cimv2",
|
||||||
"wmicPath": ""
|
"wmicPath": "/home/snoop/temp/wmic"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mappingInfo" : {
|
"mappingInfo" : {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user