mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fix
This commit is contained in:
parent
25f8cb2dce
commit
a68c04b355
@ -12,15 +12,19 @@ async function getPublicIp() {
|
||||
}
|
||||
|
||||
function getMacAddress() {
|
||||
const interfaces = os.networkInterfaces();
|
||||
for (let iface of Object.values(interfaces)) {
|
||||
for (let config of iface) {
|
||||
if (config.mac && config.mac !== '00:00:00:00:00:00') {
|
||||
return config.mac;
|
||||
try {
|
||||
const interfaces = os.networkInterfaces();
|
||||
for (let iface of Object.values(interfaces)) {
|
||||
for (let config of iface) {
|
||||
if (config.mac && config.mac !== '00:00:00:00:00:00') {
|
||||
return config.mac;
|
||||
}
|
||||
}
|
||||
}
|
||||
return '00:00:00:00:00:00';
|
||||
} catch (err) {
|
||||
return '00:00:00:00:00:00';
|
||||
}
|
||||
return '00:00:00:00:00:00';
|
||||
}
|
||||
|
||||
async function getHardwareFingerprint() {
|
||||
|
Loading…
Reference in New Issue
Block a user