what you don't know can hurt you

MapSweeper 1.0 Ping Sweeper

MapSweeper 1.0 Ping Sweeper
Posted Nov 3, 2009
Authored by 0x90

MapSweeper version 1.0 ping sweeping script.

tags | tool, scanner
systems | unix
MD5 | 52cb58dcce95f8a55f479fd797ec1e3e

MapSweeper 1.0 Ping Sweeper

Change Mirror Download
#!/usr/bin/env bash
# MapSweeper V1.0
# coded By 0x90 2009
# 0x90[at]bsdmail.org
# www.sec-r1z.com
# This tool will ping sweep networks to discover live devices
# It support Class A,B, C Network's
#
# I do not take any responsibility for what you do with this tool
# Hopefully it will make your life easier rather then making other
# peoples lives more difficult!
##############################
# ___ ___ ___
# / _ \ / _ \ / _ \
#| | | |_ _| (_) | | | |
#| | | \ \/ /\__, | | | |
#| |_| |> < / /| |_| |
# \___//_/\_\ /_/ \___/
##############################
echo ".:: MapSweeper, Coded By 0x90 ::."
echo
#Discover Network with ICMP
echo -n "Enter Start IP: "
read Strange
if [ -z "$Strange" ] ; then
echo Example: $0 192.168.1.1
exit 1
fi
echo -n "Enter End IP: "
read Enrange
if [ -z "$Enrange" ]; then
echo Example: $0 192.168.255.255
exit 1
fi
Stoct1=`echo $Strange | cut -d"." -f1`
Stoct2=`echo $Strange | cut -d"." -f2`
Stoct3=`echo $Strange | cut -d"." -f3`
Stoct4=`echo $Strange | cut -d"." -f4`

Enoct1=`echo $Enrange | cut -d"." -f1`
Enoct2=`echo $Enrange | cut -d"." -f2`
Enoct3=`echo $Enrange | cut -d"." -f3`
Enoct4=`echo $Enrange | cut -d"." -f4`

#Class A Function
class_A () {
for (( x="$Stoct2"; x <= "$Enoct2"; x++));
do
if [ "$x" != "$Stoct2" ]; then
for (( e=1; e <= "$Enoct3"; e++));
do
if [ "$e" != "$Stoct3" ]; then
for (( i=1; i <= "$Enoct4"; i++));
do
ip=""$Stoct1"."$x"."$e"."$i""
p=`ping -t 1 -c 1 $ip | grep icmp |awk '{print $8}'`
if [ "$p" == "ms" ]; then
echo $ip Live
else
echo $ip Dead
fi
done
else
for (( i="$Stoct4"; i <= 255; i++));
do
ip=""$Stoct1"."$x"."$e"."$i""
p=`ping -t 1 -c 1 $ip | grep icmp |awk '{print $8}'`
if [ "$p" == "ms" ]; then
echo $ip Live
else
echo $ip Dead
fi
done
fi
done
else
for (( e="$Stoct3"; e <= 255; e++));
do
if [ "$e" != "$Stoct3" ]; then
for (( i=1; i <= "$Enoct4"; i++));
do
ip=""$Stoct1"."$x"."$e"."$i""
p=`ping -t 1 -c 1 $ip | grep icmp |awk '{print $8}'`
if [ "$p" == "ms" ]; then
echo $ip Live
else
echo $ip Dead
fi
done
else
for (( i="$Stoct4"; i <= 255; i++));
do
ip=""$Stoct1"."$x"."$e"."$i""
p=`ping -t 1 -c 1 $ip | grep icmp |awk '{print $8}'`
if [ "$p" == "ms" ]; then
echo $ip Live
else
echo $ip Dead
fi
done
fi
done
fi
done
}

#Class B Function
class_B () {
for (( e="$Stoct3"; e <= "$Enoct3"; e++));
do
if [ "$e" != "$Stoct3" ]; then
for (( i=1; i <= "$Enoct4"; i++));
do
ip=""$Stoct1"."$Stoct2"."$e"."$i""
p=`ping -t 1 -c 1 $ip | grep icmp |awk '{print $8}'`
if [ "$p" == "ms" ]; then
echo $ip Live
else
echo $ip Dead
fi
done
else
for (( i="$Stoct4"; i <= 255; i++));
do
ip=""$Stoct1"."$Stoct2"."$e"."$i""
p=`ping -t 1 -c 1 $ip | grep icmp |awk '{print $8}'`
if [ "$p" == "ms" ]; then
echo $ip Live
else
echo $ip Dead
fi
done
fi
done
}

#Class C Function
class_C () {
for (( i="$Stoct4"; i <= "$Enoct4"; i++));
do
ip=""$Stoct1"."$Stoct2"."$Stoct3"."$i""
p=`ping -t 1 -c 1 $ip | grep icmp |awk '{print $8}'`
if [ "$p" == "ms" ]; then
echo $ip Live
else
echo $ip Dead
fi
done
}
#start counting scan time
BEGINTIME=`perl -e 'printf "%d\n", time;'`
echo
if [ "$Stoct1" == "$Enoct1" ] && [ "$Stoct2" != "$Enoct2" ]; then
echo "Scan Class A Network ..."
class_A
elif [ "$Stoct1" == "$Enoct1" ] && [ "$Stoct2" == "$Enoct2" ] && [ "$Stoct3" != "$Enoct3" ]; then
echo "Scan Class B Network ..."
class_B
elif [ "$Stoct1" == "$Enoct1" ] && [ "$Stoct2" == "$Enoct2" ] && [ "$Stoct3" == "$Enoct3" ] && [ "$Stoct4" != "$Enoct4" ]; then
echo "Scan Class C Network ..."
class_C
fi
echo

ENDTIME=`perl -e 'printf "%d\n", time;'`
totaltime=`expr ${ENDTIME} - ${BEGINTIME}`
echo Scan Complete in $totaltime seconds
exit 0

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

February 2020

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    1 Files
  • 2
    Feb 2nd
    2 Files
  • 3
    Feb 3rd
    17 Files
  • 4
    Feb 4th
    15 Files
  • 5
    Feb 5th
    24 Files
  • 6
    Feb 6th
    16 Files
  • 7
    Feb 7th
    19 Files
  • 8
    Feb 8th
    2 Files
  • 9
    Feb 9th
    2 Files
  • 10
    Feb 10th
    15 Files
  • 11
    Feb 11th
    20 Files
  • 12
    Feb 12th
    16 Files
  • 13
    Feb 13th
    19 Files
  • 14
    Feb 14th
    17 Files
  • 15
    Feb 15th
    4 Files
  • 16
    Feb 16th
    4 Files
  • 17
    Feb 17th
    34 Files
  • 18
    Feb 18th
    0 Files
  • 19
    Feb 19th
    0 Files
  • 20
    Feb 20th
    0 Files
  • 21
    Feb 21st
    0 Files
  • 22
    Feb 22nd
    0 Files
  • 23
    Feb 23rd
    0 Files
  • 24
    Feb 24th
    0 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    0 Files
  • 27
    Feb 27th
    0 Files
  • 28
    Feb 28th
    0 Files
  • 29
    Feb 29th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2016 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close