modified weinre script to detect ip address