Use ifconfig for get_lan_ip()

Your get_lan_ip() function was giving me <b>socket.gaierror: (-5, 'No address associated with hostname')</b>, so I rewrote it to parse data from ifconfig.