|
Hey so a player is trying to login while using a vpn called FastVPN but gets this error (client sided) which might have to do with the rs2 login decoder but im not sure what and how.
Someone was having a problem with Kronos a couple days ago with mac address aswell (https://www.rune-server.ee/runescape...gin-crash.html)
To allow VPN users: In the client I recommend adding a try exception when sending the mac address byte, and if there is an exception send the bytes {0} instead of the players mac address.
Can you help me with this code because it makes sense.
public byte[] getMACaddress() {
try {
InetAddress ip = InetAddress.getLocalHost();
NetworkInterface network = NetworkInterface.getByInetAddress(ip);
return network.getHardwareAddress();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
Try this:
Code:public byte[] getMACaddress() { try { InetAddress ip = InetAddress.getLocalHost(); NetworkInterface network = NetworkInterface.getByInetAddress(ip); return network.getHardwareAddress(); } catch (Exception e) { e.printStackTrace(); } return "0".getBytes(); }
Shouldn't use this tho, should find a way to return the proper mac ID. this leads to a lot of issues.Code:public byte[] getMACaddress() { try { InetAddress ip = InetAddress.getLocalHost(); NetworkInterface network = NetworkInterface.getByInetAddress(ip); return network.getHardwareAddress(); } catch (Exception e) { e.printStackTrace(); } return "0".getBytes(); }
But here's it spoon fed and fixed.
If multiple people have invalid mac's they will be set to 0 which may limit your login usages if you are using runesource. runesource uses macid to not allow more than 2 clients, with this if two people have a "invalid" mac thats set to 0, next person with an invalid mac id wont be able to login.
Cheap fix.
If you want a proper fix my suggestion is to learn how to pull mac address by each os type and to make a proper method to pull that mac id because each machine's os pulls mac id's differently.
https://stackoverflow.com/questions/...es-mac-address
identify the machines OS
use commands to run a "ipconfig" or "ifconfig" or whatever to return the value of mac id.
Use that info to store and send that macid.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |