mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-30 11:38:55 -07:00
Add compatability with newer net-tools ifconfig.
The output has changed slightly; this patch should work with older and newer versions of ifconfig.
This commit is contained in:
parent
133b933dc2
commit
e19e34997e
1 changed files with 2 additions and 2 deletions
|
@ -37,8 +37,8 @@ fi
|
|||
|
||||
INTF=$1
|
||||
PATH="$PATH:/sbin"
|
||||
IPADDR=`ifconfig $INTF | grep 'inet addr' | tr ':' ' ' | awk '{print $3}'`
|
||||
NETMASK=`ifconfig $INTF | grep 'inet addr' | tr ':' ' ' | awk '{print $7}'`
|
||||
IPADDR=`ifconfig $INTF | sed -n 's/inet addr/inet/; s/inet[ :]//p' | awk '{print $1}'`
|
||||
NETMASK=`ifconfig $INTF | sed -n 's/.*[Mm]ask[: ]//p' | awk '{print $1}'`
|
||||
DOMAIN=`grep -E "^domain |^search " /etc/resolv.conf | sort | head -1 | awk '{print $2}'`
|
||||
DNS1=$IPADDR
|
||||
DNS2=`grep ^nameserver /etc/resolv.conf | head -1 | awk '{print $2}'`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue