From owner-freebsd-questions@FreeBSD.ORG Mon Apr 25 11:56:04 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 866AE16A4D0; Mon, 25 Apr 2005 11:56:04 +0000 (GMT) Received: from mxsf10.cluster1.charter.net (mxsf10.cluster1.charter.net [209.225.28.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E65F43D48; Mon, 25 Apr 2005 11:56:04 +0000 (GMT) (envelope-from c0ldbyte@myrealbox.com) Received: from mxip09.cluster1.charter.net (mxip09a.cluster1.charter.net [209.225.28.139])j3PBu2vP026912; Mon, 25 Apr 2005 07:56:02 -0400 Received: from 24.247.253.134.gha.mi.chartermi.net (HELO eleanor.us1.wmi.uvac.net) (24.247.253.134) by mxip09.cluster1.charter.net with ESMTP; 25 Apr 2005 07:56:02 -0400 X-Ironport-AV: i="3.92,127,1112587200"; d="scan'217,208"; a="867350500:sNHT22358360" Date: Mon, 25 Apr 2005 07:55:54 -0400 (EDT) From: c0ldbyte To: Murat Balaban In-Reply-To: <20050425074033.GA14952@enderunix.org> Message-ID: <20050425074603.E4916@eleanor.us1.wmi.uvac.net> References: <426BE9EA.5090303@rnp.br><20050425074033.GA14952@enderunix.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: Alex Soares de Moura cc: freebsd-questions@freebsd.org cc: Abu Khaled 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 11:56:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 25 Apr 2005, Murat Balaban wrote: > > 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" >>>>