Script not entering VRFY after nc command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script not entering VRFY after nc command
# 1  
Old 05-26-2015
Script not entering VRFY after nc command

I am making a bash script right now and am running into an issue. As I am new to scripting, I do not know exactly what to do to get what I'm looking for in my script.

Essentially, my script will automatically input VRFY common names after nc [ip] [port]

Example:

Code:
nc 192.168.248.133 25

VRFY Allison
VRFY Adam
VRFY Bob

When I put that into a script, how would I make the command VRFY Allison be entered in directly after the command nc 192.168.248.133 25 ?

Thanks in advanced

Last edited by Don Cragun; 05-26-2015 at 12:12 AM.. Reason: Add CODE and ICODE tags.
# 2  
Old 05-26-2015
To feed the strings starting with VRFY to the process reading from port 25 on the server at IP address 192.168.248.133, try:
Code:
nc 192.168.248.133 25<<-EOF
VRFY Allison
VRFY Adam
VRFY Bob
EOF

This User Gave Thanks to Don Cragun For This Post:
# 3  
Old 05-26-2015
Thank you Don Cragun,

It works perfectly now.

Cheers,
ksrhayward
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[ksh] how to reload history file without entering a command

I'm basically looking for the ksh equivalent of bash's PROMPT_COMMAND="history -r", where simply redrawing the command prompt in a terminal will cause ksh to reload the history file. At the risk of sounding incredibly lazy (in which case I would be guilty as charged), I've noticed that if I have... (13 Replies)
Discussion started by: DevuanFan
13 Replies

2. Solaris

Not getting command prompt after entering the login password

Hi All, I am not able to get the command prompt after entering the login password on solaris server Only access is through console. Server type : sun4u sparc SUNW,Netra-T12 bsnl-north-in > ssh 10.147.17.207 jtoin Connecting to 10.147.17.207 as user jtoin Password: Last login: Wed Mar 5... (1 Reply)
Discussion started by: sandeep_kmehra
1 Replies

3. Shell Programming and Scripting

How to execute command in remote server without entering password?

Hi, i want to run the command in remote server through ssh and every time when i run the script its asking to enter the password. I dnt want to enter the password, when i enter the ip address and directly the command shuld execute. Script: #!/bin/bash echo "Enter Server IP Address:" read... (2 Replies)
Discussion started by: bapu1981
2 Replies

4. Solaris

Login delay after entering id (40 secs) same after entering pw

Hi all, I have just installed Solaris 10 on an old Fujitsu Primepower 650 which has been wiped clean. I haven't installed anything apart from the OS yet, so the machine is 99% idle. I get long delays when logging in, first after entering the id then another long delay after entering a valid... (8 Replies)
Discussion started by: longjon
8 Replies

5. UNIX for Advanced & Expert Users

[Postfix] 252 on VRFY

Hi Does anyone know how to force Postfix to always answer 252 to the VRFY command? (2 Replies)
Discussion started by: denka
2 Replies

6. UNIX for Dummies Questions & Answers

localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

hardware = raq550 running on strongbolt2. my sendmail log is littered with this entry all through the day: localhost did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA it occurrs every 15 minutes. I don't have any problem sending or receiving mail. I did a search on google but couldn't... (0 Replies)
Discussion started by: tonj
0 Replies

7. Shell Programming and Scripting

Entering parameter automatically

First of all thank you for your replies to my earlier difficulties. Now I am facing another difficulty. I have written following “for” loop. For var in `find . -name “2008_reports*”` Do Gpg -symmetric ${var} Done When I use this loop it asks to enter pass phrase every time. Is there any... (7 Replies)
Discussion started by: anushree.a
7 Replies

8. UNIX for Advanced & Expert Users

How to use SFTP from command line without entering user and password

I would like to use SFTP from command line without entering userid and password. Here is what I have gathered and did. 1) Create a public and private key pair for the protocol you want to use. To create a key pair for use by SSH2, enter: ssh-keygen -t dsa I did that and got... (7 Replies)
Discussion started by: Hangman2
7 Replies

9. Shell Programming and Scripting

Entering secret password

Hello All, I am trying to write a script when executed, asks you for the password, and confirm password; it should save to a file and also entered password should not be in clear text on the console - should be as **** Can somebody give me direction in writing this in shell? Thanks Chiru (4 Replies)
Discussion started by: chiru_h
4 Replies

10. UNIX for Dummies Questions & Answers

entering a long command

hello everyone! Very basic question for the guru's in here but anyways, I am trying to type a command that is longer than the line. What character do I use to continue my command on the next line? Thanks in advance.... Todd (1 Reply)
Discussion started by: hedrict
1 Replies
Login or Register to Ask a Question