? GR0V Shell

GR0V shell

Linux server122.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64

Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/lib/
File Upload :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/lib/network.py

# coding=utf-8
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2020 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENCE.TXT
#

# pylint: disable=no-absolute-import

import socket
import logging

def get_hostname():
    try:
        return socket.gethostname()
    except Exception:
        logging.exception('Cannot obtain hostname for server')
    return None

def get_ip_addr(hostname):
    try:
        return socket.gethostbyname(hostname)
    except socket.error:
        logging.exception('Cannot get IP address for server')
    return None

T1KUS90T
  root-grov@198.54.114.191:~$