LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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



Reply
 
Search this Thread
Old 12-13-2007, 07:49 PM   #61
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041

Going to offer the management a 'Glasgow kiss' ilikejam ?

PS I pretty much agree btw...
 
Old 12-13-2007, 07:54 PM   #62
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Well, it's either that, or run at them with the old Edinburgh socket set
 
Old 12-13-2007, 08:25 PM   #63
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
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?
 
Old 12-13-2007, 09:24 PM   #64
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,120

Original Poster
Rep: Reputation: 58
ilikejam,

can you show me your script?
 
Old 12-14-2007, 04:34 AM   #65
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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
 
Old 12-19-2007, 12:43 PM   #66
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,120

Original Poster
Rep: Reputation: 58
ok I have nmap can you work with me now?
 
Old 12-20-2007, 03:17 PM   #67
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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
 
Old 12-20-2007, 05:36 PM   #68
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,120

Original Poster
Rep: Reputation: 58
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to cut an image ? hectorDUQUE Fedora 1 04-28-2007 10:35 PM
Cut from right to left? LocoMojo Programming 26 03-01-2007 06:14 PM
cut question krock923 Programming 1 10-19-2005 05:03 PM
Ok, maybe I'm not cut out for linux... goosegg Linux - Newbie 5 09-01-2003 04:43 PM
cut-problem dahljor Programming 2 07-08-2003 01:58 PM


All times are GMT -5. The time now is 02:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration