3 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Not sure about JS, but in Python you can do this:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(('10.255.255.255', 1)) # any address works
ip_addr = s.getsockname()[0]
import uuid
hex_val = '{:012x}'.format(uuid.getnode())
mac_addr = ':'.join(hex_val[i: i + 2] for i in range(0, 11, 2))
You can also get the CPU serial number from:
cat //proc/cpuinfo | grep Serial
Edited by: JennaSys on Jun 26, 2019 4:17 PM added imports
répondu il y a 6 ans
0
Thank you!!!
I got it.
const serial = require('proc-cpuinfo')()["Serial"][0];
répondu il y a 6 ans
Contenus pertinents
- demandé il y a 2 ans
- demandé il y a un an
- demandé il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans
