Ask coding questions

← Back to all posts
1
How would i make a login so that only a specific pc can log in?
AzureScripts (130)

I want to add something to my login where it can detect if you're from the right pc. (will be part of the hash)

What data could i grab from the pc to add to the hash?

Answered by mwilki7 (111) [earned 5 cycles]
View Answer
Commentshotnewtop
1
mwilki7 (111)

mac address maybe
or come up with some rsa scheme

1
AzureScripts (130)

@mwilki7 Mac Address will do, but how do i get the mac address of a pc in python?

2
mwilki7 (111)

@AzureScripts
not absolutely certain if this works but try this

from uuid import getnode as get_mac
mac = get_mac()
print (hex(mac))
1
ash15khng (216)

@AzureScripts It may be a bit unsafe to hardcode your mac address of your PC on a repl, so you should use a env file.

1
AzureScripts (130)

@ash15khng I am not hardcoding my mac address
the address depends on who runs the script.
Different for everyone