mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-06 00:37:52 +00:00
Another attempted fix at Network nulling
See title.
This commit is contained in:
@@ -47,11 +47,14 @@ public class NetworkInterface {
|
|||||||
if (realMac != null)
|
if (realMac != null)
|
||||||
return realMac;
|
return realMac;
|
||||||
try {
|
try {
|
||||||
return realMac = java.net.NetworkInterface.getByInetAddress(
|
byte[] b = java.net.NetworkInterface.getByInetAddress(
|
||||||
InetAddress.getLocalHost()).getHardwareAddress();
|
InetAddress.getLocalHost()).getHardwareAddress();
|
||||||
|
if(b == null)
|
||||||
|
b = mac;
|
||||||
|
realMac = b;
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
return mac;
|
return realMac = mac;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NetworkInterface getByInetAddress(InetAddress addr) {
|
public static NetworkInterface getByInetAddress(InetAddress addr) {
|
||||||
|
|||||||
Reference in New Issue
Block a user