egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to login to telnet and then read any information.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
AUTIST
Voice


Joined: 01 Feb 2004
Posts: 20

PostPosted: Tue Nov 01, 2005 11:39 pm    Post subject: how to login to telnet and then read any information. Reply with quote

Hi guys,
could you please help me. I need to connect from my bot to telnet on other server and reading some stuff from there.
I think it needs to use sockets, but I don't know how can I login and then reading info from connection.
Code:
set somesock [socket "127.0.0.1" 23]

And what should I do to make a login? and the read. Please help.
Back to top
View user's profile Send private message MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Wed Nov 02, 2005 2:20 am    Post subject: Reply with quote

Using Your Eggdrop
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
AUTIST
Voice


Joined: 01 Feb 2004
Posts: 20

PostPosted: Wed Nov 02, 2005 10:41 am    Post subject: Reply with quote

Hi, looks like you didnt understand, or may be my english is very bad Smile

I don't need to connect to bot, or from bot to another bot.

I have a telnet server, and when I connect to that server I can see some codes, links, some useful stuff for me.
I need a script which can coonnect to that server to port 23, login, and then read some information from there and put it to specified chan.
I think something like that:
!connect <some-ip> <telnet-port>
bot respons is connected or not connected
if connected he will be put line by line from the telnet session to channel during it appears in remote server
Back to top
View user's profile Send private message MSN Messenger
AUTIST
Voice


Joined: 01 Feb 2004
Posts: 20

PostPosted: Wed Nov 02, 2005 11:31 am    Post subject: Reply with quote

This code is connectiong to DBOX, but I cannot recieve any data from there
Code:
if {[catch {set sock [socket "dbox" 23]} sockerr]} {
   puts "$sockerr"; puts "not connected"; return
} else {
   puts "connected"
}

flush $sock
puts "123"
while {![eof $sock]} {
set line [gets $sock]
puts $line
}

close $sock

The result is:
Code:

%tclsh test.tcl
connected
123
_ (<- carrige flashing)

And carrige flashing and nothing...
Back to top
View user's profile Send private message MSN Messenger
AUTIST
Voice


Joined: 01 Feb 2004
Posts: 20

PostPosted: Thu Nov 03, 2005 3:42 pm    Post subject: Reply with quote

Anybody could help? Please!
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Fri Nov 04, 2005 1:27 am    Post subject: Reply with quote

check out Expect
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber