开发者

Ideas on how to uniquely identify a computer?

开发者 https://www.devze.com 2023-01-19 10:06 出处:网络
I have been thinking of way开发者_如何学JAVAs I could uniquely identify a computer in python. First, I thought about checking the user\'s mac address and hard disk space, then I tried to compute some

I have been thinking of way开发者_如何学JAVAs I could uniquely identify a computer in python. First, I thought about checking the user's mac address and hard disk space, then I tried to compute some sort of rating from many of these variables. However, this solution doesn't feel right. It takes a long time to run and I had to change it many times already due to unforeseen errors.

Ideas?? Additionally, it would be very nice if it could detect running on a virtual machine.


First you need to define "computer." Is a computer the same computer if you change the case? The hard drive? The network card? Increase the RAM? Upgrade the kernel?

(It brings to mind the saying about "my grandfather's hammer" — sure, I've replaced the head five times and the handle twice, but it's still the same hammer...)

It helps to step back and identify why you need to do this. The solution might be to put a configuration file somewhere with a random key in it, and then if the user needs to absolutely nuke this identifying cookie for whatever reason, they can. (Or maybe you don't want that...)

You might find the Python UUID module useful too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号