TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: Jay Harris
from: Wilfred van Velzen
date: 2024-11-04 21:03:00
subject: Re: ping / traceroute

Hi Jay,

On 2024-11-04 14:49:32, you wrote to me:

 Wv>> DS> So if I read your comment you would like to accept a ping from
 Wv>> ping DS> but not reply with ping as from

 Wv>> Yes, that last restriction is (very) important, otherwise PONG messages
 Wv>> could "bounce" back and forth indefinitly...

 JH> my $myname = 'Ping Robot'; # From: name in PONG reply. Cannot be 'PING'
 JH> [...]
 JH> # Do not set $myname to 'PING'
 JH> if ( uc($myname) eq "PING" ) { die "ERROR: \$myname cannot be PING"; }

 JH> # Check if message is netmail & addressed to PING (case insensitive)
 JH> if ( length($area) == 0 && uc($toname) eq "PING" ) {
 JH> [...]


 JH> I think this would do that.

I think so too.

 JH> It would accept a netmail addressed to "Ping" and also from "Ping".

 JH> If someone tried setting $myname to "Ping" the script would exit with
 JH> an error.

If someone wants to change the script to do so, they could also remove the check. So the check is kind of a waste of cpu cycles. The comment should suffice.

 JH> The reply would be from "Ping Robot" to "Ping" which (if the remote
 JH> system has a ping robot) would trigger a response from that system,
 JH> e.g: From: Ping Robot & To: Ping Robot.

Indeed.


Bye, Wilfred.

--- FMail-lnx64 2.3.2.4-B20240523
                                                                                           
* Origin: FMail development HQ (2:280/464)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.