Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Perl / Getting Started / July 2009



Tip: Looking for answers? Try searching our database.

TELNET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Swayam - 03 Jul 2009 10:54 GMT
Hi ,,

          I want to test a scenario where it is required to check that the
server *should not allow telnet .Please* let me know what is the best way to
do this

my code

use Net::Telnet;

my $proxySmtpPort= 20025;

my $telnet = new Net::Telnet (Host => "localhost",
        Port => "$proxySmtpPort",
        Timeout => 10,
        Prompt => '/[$%#>] $/');

Now to Verify that the connection is no allowed and that you get the reject
message

Regards
Swayam
Peter Scott - 03 Jul 2009 15:57 GMT
> Hi ,,
>
>            I want to test a scenario where it is required to check that
>            the
> server *should not allow telnet .Please* let me know what is the best
> way to do this

If you just want to see if anything is there, make a TCP connection to the
socket and check for failure.  No need to invoke Net::Telnet.

Signature

Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.