🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #15450

Re: Programa para IPs libres

#15450
From: Ignacio Arenaza
Date: Tue, 27 Jun 2000 00:00
83 lines
4043 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Oscar" == Oscar Manuel <oscar@omgs.es> writes:

    >>  Creo que no hace falta que te rompas la cabeza. Una 'nmap'. Es
    >> capaz de barrer el rango de IPs que le pidas.

    Oscar> Vale, pero yo quiero sacar a un fichero (o algo m�s o menos
    Oscar> legible) las IPs que no est�n ocupadas, y en mis pruebas
    Oscar> saca s�lo los que est�n conectados, y con m�s informaci�n
    Oscar> de la que necesito. �Alguna otra idea?


Estoooo, directamente de la pagina del manual de nmap:

<------> <------> <------> <------> <------> <------> <------> <------> 

       -sP    Ping  scanning:  Sometimes  you  only  want to know
              which hosts on a network are up.  Nmap can do  this
              by  sending  ICMP  echo request packets to every IP
              address on the networks you  specify.   Hosts  that
              respond  are up.  Unfortunately, some sites such as
              microsoft.com block  echo  request  packets.   Thus
              nmap can also send a TCP ack packet to (by default)
              port 80.  If we get an RST back,  that  machine  is
              up.   A  third  technique  involves  sending  a SYN
              packet and waiting for a RST  or  a  SYN/ACK.   For
              non-root users, a connect() method is used.

              By  default  (for  root  users), nmap uses both the
              ICMP and  ACK  techniques  in  parallel.   You  can
              change the -P option described later.

              Note  that  pinging  is done by default anyway, and
              only hosts that respond are scanned.  Only use this
              option  if you wish to ping sweep without doing any
              actual port scans.

<------> <------> <------> <------> <------> <------> <------> <------> 

Algo como:

    nmap -sP -PI -v 192.168.0.0/24           

Deberia bastarte, �no? Ahi va un ejemplo de lo que se obtiene...

    Script started on Mon Jun 26 22:34:37 2000
    # nmap -sP -PI -v 192.168.0.0/24
    
    Starting nmap V. 2.12 by Fyodor (fyodor@dhp.com, www.insecure.org/nmap/)
    Host  (192.168.0.0) appears to be down.
    Host eb2ebu.ampr.org (192.168.0.1) appears to be up.
    Host  (192.168.0.2) appears to be down.
    Host  (192.168.0.3) appears to be down.
    ...
    ...
    Host  (192.168.0.253) appears to be down.
    Host  (192.168.0.254) appears to be down.
    Host  (192.168.0.255) appears to be down.
    Nmap run completed -- 256 IP addresses (1 host up) scanned in 1 second
    # exit
    exit
    
    Script done on Mon Jun 26 22:34:51 2000

Despues tratar eso con grep & awk (o perl) y compa�ia deberia ser
facil para tener la lista de las que estan en marcha.

Saludos. I�aki.

- -- 
  Get PGP/GPG Keys at http://personales.jet.es/inaki.arenaza/pgpkey.html
  A proud member of GULA - http://gula.hispalinux.es/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.4 and GPG

iD8DBQE5V78MZXLnGT1HLgcRAo3AAJ0fwATkCpHaph3k+yDOvV4sjd/mkgCfVS8U
ZIhcJJc97RxqtYAumnYE2ZI=
=DpUD
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <87ya3s6uwj.fsf@eb2ebu.ampr.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3951374E.5E2C5634@omgs.es> <87hfalz7ne.fsf@eb2ebu.ampr.org> <39568361.14B09671@omgs.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,d23863885ae5cfe3
X-Google-Attributes: gidf86c8,public
From: Ignacio Arenaza <iarenaza@eb2ebu.ampr.org>
Subject: Re: Programa para IPs libres
Date: 2000/06/27
Message-ID: <87ya3s6uwj.fsf@eb2ebu.ampr.org>
X-Deja-AN: 639671220
Content-Transfer-Encoding: 8bit
References: <3951374E.5E2C5634@omgs.es> <87hfalz7ne.fsf@eb2ebu.ampr.org> <39568361.14B09671@omgs.es>
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@wanadoo.es
X-Trace: m2newsread.uni2.es 962132143 62.36.89.153 (Tue, 27 Jun 2000 20:55:43 MET DST)
Organization: Wanadoo Usenet News - Visita http://www.wanadoo.es/
MIME-Version: 1.0
User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6
NNTP-Posting-Date: Tue, 27 Jun 2000 20:55:43 MET DST
Newsgroups: es.comp.os.linux.programacion