=========================================================== .___ __ __ _________________ __ __ __| _/|__|/ |_ / ___\_` __ \__ \ | | \/ __ | | \\_ __\ / /_/ > | \// __ \| | / /_/ | | || | \___ /|__| (____ /____/\____ | |__||__| /_____/ \/ \/ grep rough audit - static analysis tool v2.8 written by @Wireghoul =================================[justanotherhacker.com]=== ifupdown-extra-0.31/if-up-scripts/check-duplicate-ip-77- ifupdown-extra-0.31/if-up-scripts/check-duplicate-ip:78: if [ -z "`ip link show $real_iface up 2>/dev/null`" ]; then ifupdown-extra-0.31/if-up-scripts/check-duplicate-ip-79- return ############################################## ifupdown-extra-0.31/if-up-scripts/check-duplicate-ip6-74- ifupdown-extra-0.31/if-up-scripts/check-duplicate-ip6:75: if [ -z "`ip link show $real_iface up`" ]; then ifupdown-extra-0.31/if-up-scripts/check-duplicate-ip6-76- return ############################################## ifupdown-extra-0.31/if-up-scripts/check-gateway-92- # Check if the interface is up ifupdown-extra-0.31/if-up-scripts/check-gateway:93: if [ -z "`ip link show $real_iface up 2>/dev/null`" ]; then ifupdown-extra-0.31/if-up-scripts/check-gateway-94- return 0 ############################################## ifupdown-extra-0.31/scripts/network-test-111-# for example in PHP have an index.php file with: ifupdown-extra-0.31/scripts/network-test:112:# "<?php echo $_SERVER['REMOTE_ADDR'] ?>" ifupdown-extra-0.31/scripts/network-test-113-#with no carriage returns or line feed characters. ############################################## ifupdown-extra-0.31/scripts/network-test-128-# Trap interrupts ifupdown-extra-0.31/scripts/network-test:129:trap 'echo "`basename $0`: Quitting early due to interrupt" 1>&2; exit 1;' 1 2 3 15 ifupdown-extra-0.31/scripts/network-test-130- ############################################## ifupdown-extra-0.31/scripts/network-test-180-while read cmd package; do ifupdown-extra-0.31/scripts/network-test:181:if ! `which $cmd 2>/dev/null >&2`; then ifupdown-extra-0.31/scripts/network-test-182- err "$cmd is not available! (please install $package)" ############################################## ifupdown-extra-0.31/scripts/network-test-188-while read cmd package; do ifupdown-extra-0.31/scripts/network-test:189:if ! `which $cmd 2>/dev/null >&2`; then ifupdown-extra-0.31/scripts/network-test-190- warn "$cmd is not available (consider installing $package)" ############################################## ifupdown-extra-0.31/scripts/network-test-216- local defaultroutes="" ifupdown-extra-0.31/scripts/network-test:217: defaultif="`netstat -nr |grep ^0.0.0.0 | awk '{print $8}' | head -1`" ifupdown-extra-0.31/scripts/network-test-218- defaultroutes="`netstat -nr |grep ^0.0.0.0 | wc -l`" ############################################## ifupdown-extra-0.31/scripts/network-test-280- [ ! -x "$ETHTOOL" ] && return 0 ifupdown-extra-0.31/scripts/network-test:281: LINK="`$ETHTOOL $ifname 2>&1| grep \"Link detected\"`" ifupdown-extra-0.31/scripts/network-test-282- # If ethtool fails to print out the link line we break off ############################################## ifupdown-extra-0.31/scripts/network-test-297-# Check if the interface is up ifupdown-extra-0.31/scripts/network-test:298: if [ -z "`ip link show $real_iface up 2>/dev/null`" ]; then ifupdown-extra-0.31/scripts/network-test-299- status=1 ############################################## ifupdown-extra-0.31/scripts/network-test-367- en*@* | eth*@*) ifupdown-extra-0.31/scripts/network-test:368: realif="`echo $ifname | sed -e 's/^.*@//g'`" ifupdown-extra-0.31/scripts/network-test:369: ifname="`echo $ifname | sed -e 's/@.*//g'`" ifupdown-extra-0.31/scripts/network-test-370- check_if_link_ethernet $realif ; status=$?;; ############################################## ifupdown-extra-0.31/scripts/network-test-406- ifupdown-extra-0.31/scripts/network-test:407: inetaddr="`cat \"$tempfile\" | grep \"inet \" | awk '{print $2}' | sed -e 's/\/.*//'`" ifupdown-extra-0.31/scripts/network-test-408- if [ -z "$inetaddr" ] ; then ############################################## ifupdown-extra-0.31/scripts/network-test-434-# more readibility or, better, 'netstat -i' ifupdown-extra-0.31/scripts/network-test:435: txpkts="`cat \"$tempfile\" | awk '/TX packets/ { print $3 }' |sed 's/.*://'`" ifupdown-extra-0.31/scripts/network-test:436: rxpkts="`cat \"$tempfile\" | awk '/RX packets/ { print $3 }' |sed 's/.*://'`" ifupdown-extra-0.31/scripts/network-test:437: txerrors="`cat \"$tempfile\" | awk '/TX errors/ { print $3 }' |sed 's/.*://'`" ifupdown-extra-0.31/scripts/network-test:438: rxerrors="`cat \"$tempfile\" | awk '/RX errors/ { print $3 }' |sed 's/.*://'`" ifupdown-extra-0.31/scripts/network-test-439- ############################################## ifupdown-extra-0.31/scripts/network-test-506- while read ifnumber ifname status extra; do ifupdown-extra-0.31/scripts/network-test:507: ifname="`echo $ifname |sed -e 's/:$//'`" # Strip the ending ':' ifupdown-extra-0.31/scripts/network-test-508- [ "$ifname" = "lo" ] && continue # Skip loopback ############################################## ifupdown-extra-0.31/scripts/network-test-511- # twice. ifupdown-extra-0.31/scripts/network-test:512: if [ -n "`echo $extra | grep DOWN `" ] || ifupdown-extra-0.31/scripts/network-test:513: [ -n "`echo $status | grep NO-CARRIER`" ] ifupdown-extra-0.31/scripts/network-test-514- then ############################################## ifupdown-extra-0.31/scripts/network-test-522- fi ifupdown-extra-0.31/scripts/network-test:523: if [ -n "`echo $extra | grep LOWERLAYERDOWN `" ] ; then ifupdown-extra-0.31/scripts/network-test:524: realif="`echo $ifname | sed -e 's/^.*@//g'`" ifupdown-extra-0.31/scripts/network-test-525- info "$ifname is down because the underlying interface '$realif' is down" ############################################## ifupdown-extra-0.31/scripts/network-test-625-# Router does not answer, check arp ifupdown-extra-0.31/scripts/network-test:626: routerarp="`arp -n | grep \"^$router\" | grep -v incomplete`" ifupdown-extra-0.31/scripts/network-test-627- if [ -z "$routerarp" ] ; then ############################################## ifupdown-extra-0.31/scripts/network-test-701- ifupdown-extra-0.31/scripts/network-test:702: for nameserver in `cat $tempfile`; do ifupdown-extra-0.31/scripts/network-test-703- nsfound=$(( $nsfound + 1 )) ############################################## ifupdown-extra-0.31/scripts/network-test-714- #Could also do: ifupdown-extra-0.31/scripts/network-test:715: #nsfound="`wc -l $tempfile | awk '{print $1}'`" ifupdown-extra-0.31/scripts/network-test-716- clear_temp $tempfile ############################################## ifupdown-extra-0.31/scripts/network-test-751-# Using dnscheck: ifupdown-extra-0.31/scripts/network-test:752: dnscheck="`host -t A $CHECK_HOST $nameserver 2>&1 | tail -1`" ifupdown-extra-0.31/scripts/network-test:753: if [ -n "`echo $dnscheck |grep NXDOMAIN`" ] ; then ifupdown-extra-0.31/scripts/network-test-754- err "Dns server $nameserver does not resolv properly" ifupdown-extra-0.31/scripts/network-test:755: elif [ -n "`echo $dnscheck | grep \"timed out\"`" ] ; then ifupdown-extra-0.31/scripts/network-test-756- err "Dns server $nameserver is not available" ifupdown-extra-0.31/scripts/network-test:757: elif [ -z "`echo $dnscheck | egrep \"$CHECK_RESULT\"`" ] ; then ifupdown-extra-0.31/scripts/network-test-758- warn "Dns server $nameserver did not return the expected result for $CHECK_HOST" ############################################## ifupdown-extra-0.31/scripts/network-test-826- fi ifupdown-extra-0.31/scripts/network-test:827: md5=`md5sum $tempfile | awk '{print $1}'` ifupdown-extra-0.31/scripts/network-test-828- if [ $md5 = "$CHECK_WEB_MD5" ] ; then ############################################## ifupdown-extra-0.31/scripts/network-test-840-# ifupdown-extra-0.31/scripts/network-test:841:check_ip_addr () { ifupdown-extra-0.31/scripts/network-test-842- local status=0 ############################################## ifupdown-extra-0.31/scripts/network-test-854- info "System can access web server at Internet host $CHECK_IP_URL" ifupdown-extra-0.31/scripts/network-test:855: ip_address=`cat $tempfile` ifupdown-extra-0.31/scripts/network-test-856- info "System public IPv4 address is $ip_address" ############################################## ifupdown-extra-0.31/scripts/network-test-861- ifupdown-extra-0.31/scripts/network-test:862:check_ip6_addr () { ifupdown-extra-0.31/scripts/network-test-863- local status=0 ############################################## ifupdown-extra-0.31/scripts/network-test-872- info "System can access web server at Internet host $CHECK_IP6_URL" ifupdown-extra-0.31/scripts/network-test:873: ip_address=`cat $tempfile` ifupdown-extra-0.31/scripts/network-test-874- info "System public IPv6 address is $ip_address" ############################################## ifupdown-extra-0.31/scripts/network-test-890- info "System can access web server at Internet host $CHECK_GEOIP_URL" ifupdown-extra-0.31/scripts/network-test:891: geoip_info=`cat $tempfile` ifupdown-extra-0.31/scripts/network-test-892- info "System public geoIP information: $geoip_info"