#!/usr/bin/env python
import re

__author__ = '@pixelnull'
__licence__ = 'Unlicence'

# This will be a simple TCP messenger, maybe even with a GUI someday
# For now though it's just basic stuff

import socket
import urllib.request


def get_host_ip():
    my_net_ip = socket.gethostbyname(socket.gethostname())
    return my_net_ip

def get_ext_ip():
    ext_ip = str(urllib.request.urlopen('http://icanhazip.com').read())
    ext_ip = ext_ip.strip("b'")
    my_ext_ip = ext_ip.replace("\\n", "")
    return my_ext_ip

def server(in_mess):
    s = socket.socket()

    return



#debugging
print(get_host_ip())
print(get_ext_ip())
message = input(">")
server(message)