From owner-freebsd-questions@FreeBSD.ORG Mon Apr 25 07:40:40 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 884DB16A4CF for ; Mon, 25 Apr 2005 07:40:40 +0000 (GMT) Received: from istanbul.enderunix.org (freefall.marmara.edu.tr [193.140.143.23]) by mx1.FreeBSD.org (Postfix) with SMTP id CBD9943D3F for ; Mon, 25 Apr 2005 07:40:35 +0000 (GMT) (envelope-from murat@enderunix.org) Received: (qmail 15092 invoked by uid 1002); 25 Apr 2005 07:40:33 -0000 X-Mail-Scanner: Scanned by qSheff 0.8-p3 against viruses and spams (http://www.enderunix.org/qsheff/) Date: Mon, 25 Apr 2005 10:40:33 +0300 From: Murat Balaban To: Abu Khaled Message-ID: <20050425074033.GA14952@enderunix.org> References: <426BE9EA.5090303@rnp.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: Alex Soares de Moura cc: freebsd-questions@freebsd.org cc: freebsd-net@freebsd.org Subject: Re: scaning the local network with arping/sh script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2005 07:40:40 -0000 Hi, Did you check http://www.enderunix.org/knowlan/ ? What is Knowlan? Knowlan is ARP protocol based Local Area Network IP and MAC Adress Extractor. Knowlan uses libpcap and libnet libraries for to be simple to handle and to have a simple code for any interestor to deal with the code. To describe knowlan overally, Knowlan, sends ARP REQUEST packets to the LAN, and at the same time, It recieves ARP REPLY packets from the up machines. So, It prints out IP and MAC addresses of online machines On Mon, Apr 25, 2005 at 07:41:30AM +0300, Abu Khaled wrote: > On 4/24/05, Alex Soares de Moura wrote: > > Abu Khaled wrote: > > > > >Greetings... > > > > > >I don't know much about scripting but i tried to write one to scan my > > >local network using the net/arping port. > > >here is the script: > > > > > >#!/bin/sh > > >IP=1 > > >while [ $IP -le 20 ] > > >do > > >echo -e ".\c" > > > if ( arping -c 1 -q -i rl1 10.0.0.$IP ) then > > > echo -e "\n10.0.0.$IP Online" > > > fi > > >IP=$(( $IP +1 )) > > >done > > >echo -e "\n" > > >