Skip to content

Instantly share code, notes, and snippets.

@iamramahibrah
Created March 30, 2021 05:56
Show Gist options
  • Save iamramahibrah/abdfc09e051a09700a39ba0e74e4ab31 to your computer and use it in GitHub Desktop.
Save iamramahibrah/abdfc09e051a09700a39ba0e74e4ab31 to your computer and use it in GitHub Desktop.
import socket, getmac
#user_info_function
def userinfo():
host = socket.gethostname()
ip = socket.gethostbyname(host)
mac = getmac.get_mac_address()
print("Host name : ",host)
print("Ip Address : ",ip)
print("Mac Address : ",ip)
userinfo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment