Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Check for tftp daemon listening on remote server

by xylus (Pilgrim)
on Jan 16, 2002 at 22:55 UTC ( [id://139281]=note: print w/replies, xml ) Need Help??


in reply to Check for tftp daemon listening on remote server

I attempted to run the code myself, and with a few tests it appeared to work. As it is, the only warning I received was when the port was down, $checkpoint is undefined.

Could you perhaps give us a little more detail as to what isn't working? Are you receiving any error messages?

----------------------------------------------------------
#!/usr/bin/perl
@==qw/p e r l m o n k s/;$|*=1;@;=qw/8 15 7 9 -1 7 7 2 0/;
foreach$-(@=){for(++$|..$;[$:++]){$-++}$..=$-}$.=~s/m/l/g;
$*=$;[4]+1;for($;[9]..$;[0]/2){$,.=substr($.,$*++,1);$*++;
}print$,;#http://www.perlmonks.org/index.pl?node_id=98506;
  • Comment on Re: Check for tftp daemon listening on remote server

Replies are listed 'Best First'.
Re: Re: Check for tftp daemon listening on remote server
by c (Hermit) on Jan 16, 2002 at 23:02 UTC
    When I run the above code, I always receive the response that the port is listening. Even when I shut down my tftp server and verify that the server is not listening on UDP69 through netstat -na | grep -i udp. *:69 does not show up in the list. Yet, I receive the response from the script that port is up.

    humbly -c

      I'm not really sure where to go from here. I've tried the code on 6 separate linux servers, 2 BSD servers, and 2 Windows 2000 workstations. All have the same output.

      It may be a system-level thing on the computer you are working with (maybe the TFTP Daemon is still listening)

      What OS are you attempting to run this under? Perhaps there is some debugging you can do there?
      
      ----------------------------------------------------------
      #!/usr/bin/perl
      @==qw/p e r l m o n k s/;$|*=1;@;=qw/8 15 7 9 -1 7 7 2 0/;
      foreach$-(@=){for(++$|..$;[$:++]){$-++}$..=$-}$.=~s/m/l/g;
      $*=$;[4]+1;for($;[9]..$;[0]/2){$,.=substr($.,$*++,1);$*++;
      }print$,;#http://www.perlmonks.org/index.pl?node_id=98506;
      
        I'm trying this script out strictly on RedHat Linux 7.1 machines. I've tried it on serveral boxes that do not have a tftp server running and yet the response is always Port is up". Are you actually seeing the output of "Port 69 is down"?

        humbly -c

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://139281]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-20 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found