[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/dev/tcp telnet negotiation

From: Allan Pinto
Subject: /dev/tcp telnet negotiation
Date: Thu, 28 Apr 2011 17:39:02 +0530

i run a lot telnet scripts using /dev/tcp for cisco routers, lately we
have newer models of cisco routers which have ios-xr which is based on
linux and also some mikrotik routers which are again based on linux,
on these devices when i run my script all i get is  ÿý^Xÿý
ÿý#ÿý'ÿý$ÿý! in my output, no username prompt, on the same device if
if use a netcat -T option which is for telnet negotiation, it works,
Could anyone guide me in the right direction where i can achieve the
same using /dev/tcp
below example script


exec 3<>/dev/tcp/$1/23
sleep 1
echo -e "username">&3
echo -e "password">&3
echo -e "sh ver">&3
#sleep 2
echo -e "logout">&3
cat<&3 > $1.txt

Thanx and regd's.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]