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 query = item.getQueryInfo().getQuery();
|
||||
|
||||
|
||||
String wmicPath = (String)item.getQueryInfo().getExtend().get("wmicPath");
|
||||
//FIXME:: where is wmic ??
|
||||
List<String> argList = new ArrayList<String>();
|
||||
|
||||
argList.add("/home/snoop/temp/wmic");
|
||||
argList.add(wmicPath);
|
||||
argList.add("-U");
|
||||
argList.add(id + "%" + pw);
|
||||
argList.add("//" + ip);
|
||||
|
|
|
@ -116,6 +116,7 @@ public class WMICrawlerTest {
|
|||
System.out.println(c);
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void testWMIJson() throws Exception {
|
||||
|
||||
|
|
|
@ -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" : {
|
||||
|
|
Loading…
Reference in New Issue
Block a user