UPnP-Hack
UPnP-Hack copied to clipboard
Command output parsing bug
It does not send the UPnP discovery packet because the command to parse the IP address of the target interface fails. Probably because of changes made to the output format of ifconfig.
I did not want to clone the repo so here is a shallow fix. add a sed filter to the command pipe to strip the whitespace in front. before:
5: get_ip = lambda(x): os.popen('ifconfig {0} | grep -e "inet\ " | cut -d" " -f2'.format(x)).read().strip()
after :
5: get_ip = lambda(x): os.popen('ifconfig {0} | grep -e "inet\ " | sed "s/^ *//g" | cut -d" " -f2'.format(x)).read().strip()