-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 10 Dec 2008 10:32:42 +0100 Dario Lombardo
<[email protected]> wrote:
...
>Anyway, il comando che io darei e' questo
>
>while true ; do lsof -i -P | grep "<PORT>" | awk ' { print $1; } '

>>
>/tmp/foundport ; usleep 1000; done


Avevo un'aggiunta da fare al thread
Ho scoperto oggi /sbin/ss (Debian vd. package iproute)
che permette tra l'altro anche la scoperta dell'inode e
informazioni utili sul timing

Un esempio di base riferito a quello di Dario

while true ; do ss -poena |grep :<NUM_PORTA> > /tmp/porta_sospetta
; sleep 1s; done &

con il numero 22 mi viene

# cat /tmp/porta_sospetta
LISTEN     0      128                       *:22
   *:*      users:(("sshd",2820,3)) ino:6225 sk:d7672080
ESTAB      0      0              192.168.1.80:22
192.168.1.99:1099   timer:(keepalive,85min,0)
users:(("sshd",7389,3)) ino:13460 sk:cc60c080

per ogni riferimento consulta il man, ss (8)

Ciao,
H.
-----BEGIN PGP SIGNATURE-----
Charset: UTF8
Version: Hush 3.0
Note: This signature can be verified at https://www.hushtools.com/verify

wpwEAQMCAAYFAklrWuIACgkQxcpfdCBapkewWgP/TZvcrV6m/ph6cpyzC11rq/vQS0Gz
WAONxI6SbMT5i4BmpHzC9F6zsgSnvD7Lyb51jT7+//5aNiTS1yv7f2DUegcdEfBKZ3UF
kHzZAa5BXgo40Hc3eyzaOBdEafaZuvgFuQKMnB+7uHXZ2XY0YvovkM1q2TyHCXEtrkxT
X+3mUZM=
=bgxU
-----END PGP SIGNATURE-----

--
Want a great salary and great benefits?  Click here to start a criminal justice 
career.
 
http://tagline.hushmail.com/fc/PnY6qxtpLJe4Gv7eh6SzdoKBgqBiWs7sMBbRUikEW7HZqd4vOK9sZ/

________________________________________________________
http://www.sikurezza.org - Italian Security Mailing List

Rispondere a