Telnet TLS check script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Telnet TLS check script
# 1  
Old 11-10-2008
Telnet TLS check script

I'm writing a little script to check if MTA's supports TLS but I'm stuck on getting the output.

Code:
#! /usr/bin/perl

use Net::Telnet(); 
$checker = new Net::Telnet (Telnetmode => 0);
$checker->open(Host => $ARGV[0],
           port => 25);

$checker->waitfor('/220/');
$checker->print("ehlo test");
$checker->waitfor('/STARTTLS/');
$line = $checker->getline;
print "$line\n";

When I print each step, I get this:

Code:
Net::Telnet=GLOB(0x8d61d5c)
Net::Telnet=GLOB(0x8d61d5c)
Net::Telnet=GLOB(0x8d61d5c)

Any help is appreciated.

Last edited by s_becker; 11-10-2008 at 09:13 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Check telnet port multiple server

Dear Team, I want to check multiple linux server to check port open. eg. 192.168.1.12 80,192.168.1.12 443 Please provide script for that? (8 Replies)
Discussion started by: pradeep1807
8 Replies

2. Solaris

How to configure CUPS on Solaris 11.3 - TLS and no TLS?

We are implementing CUPS on a new Solaris 11.3 system. The same system will run an application where users can print to networked printers inside our organisation, or to a printer outside of our organisation over the internet. For users printing to internal network printers, no encryption is... (0 Replies)
Discussion started by: SallyB
0 Replies

3. AIX

AIX sendmail and tls

The situation Version AIX7.1/8.14.4 Compiled with: DNSMAP LDAPMAP LDAP_REFERRALS LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS PIPELINING SCANF STARTTLS USERDB USE_LDAP_INIT XDEBUG... (2 Replies)
Discussion started by: Linusolaradm1
2 Replies

4. UNIX for Advanced & Expert Users

FTP over implicit TLS

Here are the essentials: un: myuser pw: mypasswd site: sftp.somesite.com port: 990 type: FTPS enc: FTP over implicit TLS program used: Curl 7.1.x on Hpux 11.31 I would like to "put" 1 file on there server. Here is my syntax, what am I doing wrong? curl -3 -v --cacert... (4 Replies)
Discussion started by: olyanderson
4 Replies

5. UNIX for Advanced & Expert Users

SSL/TLS with openldap

Hello to all, I'm beguinner in Linux instalations and I'm trying to Communicate from Web Sites that i have running under apache with openLDAP for users authentication using SSL mediation that seems to be connected with LDAPS. Can someone advise me how to do this, I have already installed... (1 Reply)
Discussion started by: CPMarco
1 Replies

6. Shell Programming and Scripting

SSH shell script to access FTP over explicit TLS/SSL

Hello, I use the following SSH script to upload *.jpg files via FTP: #!/usr/bin/expect set timeout -1 spawn ftp -v -i expect "" send "\r" expect "Password:" send "\r" expect "ftp>" send "mput *.jpg\r" expect "ftp>" send "quit\r" replaced with actual ftp server/account data. ... (5 Replies)
Discussion started by: mrpi007
5 Replies

7. Shell Programming and Scripting

script to check if another script is running and if so, then sleep for sometime and check again

Hi, I am a unix newbie. I need to write a script to check wheteher another script is still running. If it is, then sleep for 30m and then check again if the script is running. If the script has stopped running then, I need to come out of the loop. I am using RHEL 5.2 (2 Replies)
Discussion started by: mathews
2 Replies

8. AIX

Alternative URL to check for the lastest TLs

Hi all, I'm sorry to post this question, but I searched and searched and search but I did not find an alternative url for this one: http://www14.software.ibm.com/webapp/set2/abl/bundle?release=52 (53) I used this site to check for the latest TLs. Thanks in advanced :) tex (3 Replies)
Discussion started by: tex09
3 Replies

9. UNIX for Dummies Questions & Answers

check for successfull telnet session

In either case using ksh or tcl, how can I check that I have a successfule telnet session and am being prompted with a tacacs login prompt ? :confused: DOIT () { sleep 2 echo "<tacacs name >" sleep 1 echo "<password>" echo "en" sleep 1 echo "<enable password>" echo "term length 512"... (0 Replies)
Discussion started by: sumguy
0 Replies

10. UNIX for Dummies Questions & Answers

Script to check for a file, check for 2hrs. then quit

I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit. Logically, I'm looking for the best way to approach this Thanks for any assistance in advance. Note: I'm using a C shell and... (2 Replies)
Discussion started by: mmarsh
2 Replies
Login or Register to Ask a Question