HEX
Server: Apache/2.4.68 (codeit) OpenSSL/4.0.1
System: Linux societies-web 5.4.17-2136.353.3.el8uek.x86_64 #3 SMP Thu Feb 12 09:46:56 PST 2026 x86_64
User: yles (1028)
PHP: 8.3.31
Disabled: exec,shell_exec,passthru,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,symlink,pcntl_exec
Upload Files
File: //bin/netaddr3
#!/usr/libexec/platform-python -s -s
#-----------------------------------------------------------------------------
#   Copyright (c) 2008 by David P. D. Moss. All rights reserved.
#
#   Released under the BSD license. See the LICENSE file for details.
#-----------------------------------------------------------------------------
"""an interactive shell for the netaddr library"""

import os
import sys
import netaddr
from netaddr import *

#   aliases to save some typing ...
from netaddr import IPAddress as IP, IPNetwork as CIDR
from netaddr import EUI as MAC

argv = sys.argv[1:]

banner = "\nnetaddr shell %s - %s\n" % (netaddr.__version__, __doc__)
exit_msg = "\nShare and enjoy!"
rc_override = None

try:
    try:
        # ipython >= 0.11
        from IPython.terminal.embed import InteractiveShellEmbed
        ipshell = InteractiveShellEmbed(banner1=banner, exit_msg=exit_msg)
    except ImportError:
        # ipython < 0.11
        from IPython.Shell import IPShellEmbed
        ipshell = IPShellEmbed(argv, banner, exit_msg, rc_override)
except ImportError:
    sys.stderr.write('IPython (http://ipython.scipy.org/) not found!\n')
    sys.exit(1)

ipshell()