Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
12-13-2007, 06:49 PM
|
#61
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,021
|
Going to offer the management a 'Glasgow kiss' ilikejam ?

PS I pretty much agree btw...
|
|
|
|
12-13-2007, 06:54 PM
|
#62
|
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
Well, it's either that, or run at them with the old Edinburgh socket set 
|
|
|
|
12-13-2007, 07:25 PM
|
#63
|
|
Guru
Registered: Aug 2004
Location: Brisbane
Distribution: Centos 6.4, Centos 5.9
Posts: 15,021
|
Now that's a new one on me... 
Of course you don't always have a 'set' on you ...
wonder what the OP is doing?
|
|
|
|
12-13-2007, 08:24 PM
|
#64
|
|
Senior Member
Registered: Feb 2003
Location: Washington D.C
Posts: 2,052
Original Poster
Rep:
|
ilikejam,
can you show me your script?
|
|
|
|
12-14-2007, 03:34 AM
|
#65
|
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
The nmap script I use at work?
Code:
#!/bin/bash
HOST="$1"
LISTDIR="$HOME/hostlists"
LIST="$LISTDIR/$HOST"
if ! [ -f "$LIST" ]
then
/usr/local/bin/nmap -P0 -sT -p22 $HOST 2>&1 | egrep 'closed|filtered|Failed to resolve' > /dev/null
if [ $? == 0 ]
then
echo "$HOST - WARNING NO SSH"
else
echo "$HOST - OK"
fi
exit
fi
for go in `cat $LIST`
do
/usr/local/bin/nmap -P0 -sT -p22 $go 2>&1 | egrep 'closed|filtered|Failed to resolve' > /dev/null
if [ $? == 0 ]
then
echo "$go - WARNING NO SSH"
else
echo "$go - OK"
fi
done
I have a set of host lists at $HOME/hostlists (like lists of all the Solaris 10 hosts, all the production hosts, all the Sparc hosts etc). The above script takes a single argument, which can be either the filename of one of those lists, or a single hostname. Just change the '-p22' arg to '-p23' to test telnet.
Dave
|
|
|
|
12-19-2007, 11:43 AM
|
#66
|
|
Senior Member
Registered: Feb 2003
Location: Washington D.C
Posts: 2,052
Original Poster
Rep:
|
ok I have nmap can you work with me now?
|
|
|
|
12-20-2007, 02:17 PM
|
#67
|
|
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109
Rep:
|
Cool.
If you've got a list of hostnames:
Code:
#!/bin/bash
LIST="$1"
if ! [ -f "$LIST" ]
then
exit 1
fi
for go in `cat $LIST`
do
/usr/local/bin/nmap -P0 -sT -p23 $go 2>&1 | egrep 'closed|filtered|Failed to resolve' > /dev/null
if [ $? == 0 ]
then
echo "$go - No telnet"
else
echo "$go - Telnet on"
fi
done
Run that with the list of hostnames as the argument, and it'll spit out the telnet status of the hosts.
Dave
|
|
|
|
12-20-2007, 04:36 PM
|
#68
|
|
Senior Member
Registered: Feb 2003
Location: Washington D.C
Posts: 2,052
Original Poster
Rep:
|
Wow,
After working with several senior nix admins and even working with nmap, we still recieve false/positives when scanning the Cisco NAM version 1 and 2 when scanning only the telnet port 23. It seems at though they are enabled but are set not to recieve any logins. I have not looked at the devices configuration but when you telnet to them, it says connected and then in disconnect you. This is on several devices. This only happens with the Cisco products. Can anyone tell me what could be the issue and if there is a solution for this problem?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:09 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|