steve fiedler on 11 Aug 2015 11:04:49 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Need Help with a script for netcat


Its running on suse 11 and its v 1.1.  I am not at work so I can't give more detail...

Steve

On Aug 11, 2015 2:01 PM, brent timothy saner <brent.saner@gmail.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 08/11/2015 12:13 PM, Keith C. Perry wrote:
> didn't work with the while loop either....  I just tried it with a -w
> 3600, assuming it would wait 3600 seconds til it disconnected.  Started
> it up with an ampersand, called the PBX, hung up. Tail -f the file from
> a different putty session and saw the info for the call come in....then
> I saw this on the screen.
>
> [1]+  Stopped                 ./get_smdr.sh
>
> If I do a ps -ef | grep get_, or grep for netcat, both are still running
> but its not updating the file any longer.  If I kill the pid for
> get_smdr.sh, it then says killed and kills the pid for netcat and if I
> restart, works fine again for a bit.
>
> What is the difference between stopping and killing?
>
> I thought that maybe the PBX was sending a terminate or end command but
> that would not effect the get_smdr script and besides, in the
> foreground, will run all day long
>
> Thanks,
> Steve
>


Sorry, I didn't see this mentioned anywhere yet- *which* netcat are you
referring to?

Right off the top of my head, I know four:

"nc", which is the original "Hobbit" source from old UNIX days (plus
usually patched in ipv6 support plus some other patches from debian)

"ncat", which is Nmap suite's netcat

"netcat", openBSD's vanilla netcat

"netcat", GNU's total rewrite.


and i'm sure there are other forks.

and they can all be called 'nc' or 'netcat' on the system.

and they all (generally) have incompatible options.

and distros usually include two or more of the above in their package
repositories.


so knowing which one can be confusing. :) if you check the manpage, it
should give clues under Authors section.


from there i can maybe help you out, but i don't want to take a stab and
guess the wrong netcat.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJVyjhiAAoJEIwATC+TSB9rEvoP/jEesu8NxNhUZM+HoobqhQU/
D616f0KohDtRyI/wvQg+Ilk+sC3kzKwofxu97y7ossJrbFrCLoeb7f5Wv/+oMgHX
KZhH4d3SxguxXnyNmlPGBnkf8WM9JkOlpANbNeqSu2QQlLtaMrXVqTO9FToMryt3
c67h4KFAgrHGgCPKy1HT+jdROYLP9uzcpovL0SK1Z+AKHfQZT33JZ100k/2lkdPo
0A8w+X1ej2giOyHfwu2FECQNEc+ZEQtOMnAdonEdIPxOEjBtp7GiudhDE/GQAWve
/KWUCyVoWPFRBgI8HATEnslXDsXAD59B9+fs894JGL5u7u7JBG1cQheS22GX24ws
597VzxZfIzOGWZOUWmMCItqeHPre7OMp2vvR5G/e33Wh5a8xOQajhyUsi9igVE6y
WRHqMz61tjbanMMaHrb6j8Sd6Sttri0i5M/oLCfA6pkY1FBBRA/Tb/ByChcjuQIg
bUMRklIZJmiLX84BMAp8fsNGnb1k+bTVQAOzfR2Iu+XVXhwzBJiEsBZm7MuPjNzA
UuglaIUTeVVIo1olaBX+AX7zSMae6aXAuURU1o1s5AGUYfofBikwKXgYrnb7XIj5
dHlcp9vWtPgyj6kkK7AkVvx/JeC2sJFjSWjS+rw3Q+ALt9CsijdvIEELgQ2L0M4j
rdoXDfezCHI671dZbw8V
=SfDy
-----END PGP SIGNATURE-----
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug