-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdetails.py
More file actions
40 lines (34 loc) · 878 Bytes
/
details.py
File metadata and controls
40 lines (34 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os
import platform
from getmac import get_mac_address as gma
import socket
import urllib.request
"""https://cdn.discordapp.com/attachments/101207951445352518/1131062228930543656"""
format = "---------------------------------------------------"
directory = os.getcwd()
def detailGetter():
hostname = socket.gethostname()
privateIP = socket.gethostbyname(hostname)
publicIP = external_ip = urllib.request.urlopen(
'https://ident.me').read().decode('utf8')
mac = gma()
user = os.getlogin()
system = platform.system()
release = platform.release()
version = platform.version()
allAtOnce = f"""
Hostname: {hostname}
{format}
Public IP Address: {publicIP}
{format}
Private IP Address: {privateIP}
{format}
Mac address: {mac}
{format}
User: {user}
{format}
OS info: \n---{system}\n---{release}\n---{version}
{format}
CWD: {os.getcwd()}
{format}
"""