Permalink
Browse files

fix netmask when subnet is splitted

  • Loading branch information...
1 parent d5266c7 commit 697ec464dbbe3f78cf0df16822682fed021f8696 @poliva committed Oct 27, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 wifi/hotspot-bypass.sh
View
6 wifi/hotspot-bypass.sh
@@ -37,7 +37,11 @@ fi
for net in `cat /tmp/sipcalc.$$` ; do
- network="$net/$mask"
+ if [ $mask -lt 24 ]; then
+ network="$net/24"
+ else
+ network="$net/$mask"
+ fi
nmap -n -PR -sP -oX /tmp/hotspot.$$.xml $network >/dev/null
# process nmap results in reverse order

0 comments on commit 697ec46

Please sign in to comment.