mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
21 lines
554 B
Java
21 lines
554 B
Java
public class DetectJVM {
|
|
private static final String keys[] = {
|
|
"sun.arch.data.model",
|
|
"com.ibm.vm.bitmode",
|
|
"os.arch",
|
|
};
|
|
|
|
public static void main(String[] args) {
|
|
boolean print = args.length > 0 && "-print".equals(args[0]);
|
|
for (String key : keys) {
|
|
String property = System.getProperty(key);
|
|
if (print) System.out.println(key + "=" + property);
|
|
if (property != null) {
|
|
int errCode = (property.indexOf("64") >= 0) ? 64 : 32;
|
|
if (print) System.out.println("err code=" + errCode);
|
|
System.exit(errCode);
|
|
}
|
|
}
|
|
}
|
|
}
|