mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
Fix for date error on job.info call.
git-svn-id: file:///home/svn/framework3/trunk@9916 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
9b0e9fca55
commit
7f87cb9e55
Binary file not shown.
@ -7,6 +7,8 @@ import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
import java.security.SecureRandom;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -198,7 +200,14 @@ public class RpcConnection {
|
||||
return new Integer(type.getTextContent());
|
||||
}else if (typeName.equals("boolean")){
|
||||
return new Boolean(type.getTextContent().equals("1"));
|
||||
}else{
|
||||
}else if (typeName.equals("dateTime.iso8601")) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
|
||||
try{
|
||||
return sdf.parse(type.getTextContent());
|
||||
}catch(ParseException pex){
|
||||
return type.getTextContent();
|
||||
}
|
||||
} else {
|
||||
throw new MsfException("Error reading val: unknown type " + typeName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user