Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.37
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby19 /
share /
ri /
1.9.1 /
system /
Net /
Telnet /
Delete
Unzip
Name
Size
Permission
Date
Action
binmode%3d-i.ri
248
B
-rw-r--r--
2023-07-26 17:26
binmode-i.ri
333
B
-rw-r--r--
2023-07-26 17:26
cdesc-Telnet.ri
4.18
KB
-rw-r--r--
2023-07-26 17:26
close-i.ri
210
B
-rw-r--r--
2023-07-26 17:26
cmd-i.ri
1.68
KB
-rw-r--r--
2023-07-26 17:26
login-i.ri
1.37
KB
-rw-r--r--
2023-07-26 17:26
new-c.ri
5.62
KB
-rw-r--r--
2023-07-26 17:26
preprocess-i.ri
545
B
-rw-r--r--
2023-07-26 17:26
print-i.ri
502
B
-rw-r--r--
2023-07-26 17:26
puts-i.ri
316
B
-rw-r--r--
2023-07-26 17:26
sock-i.ri
357
B
-rw-r--r--
2023-07-26 17:26
telnetmode%3d-i.ri
394
B
-rw-r--r--
2023-07-26 17:26
telnetmode-i.ri
480
B
-rw-r--r--
2023-07-26 17:26
waitfor-i.ri
2.43
KB
-rw-r--r--
2023-07-26 17:26
write-i.ri
381
B
-rw-r--r--
2023-07-26 17:26
Save
Rename
U:RDoc::NormalClass[iI"Telnet:EFI"Net::Telnet;FI"Object;Fo:RDoc::Markup::Document:@parts[o;;[ S:RDoc::Markup::Heading: leveli: textI"Net::Telnet;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[I"*Provides telnet client functionality.;T@o; ;[ I"BThis class also has, through delegation, all the methods of a;TI"Dsocket object (by default, a +TCPSocket+, but can be set by the;TI"F+Proxy+ option to <tt>new()</tt>). This provides methods such as;TI"G<tt>close()</tt> to end the session and <tt>sysread()</tt> to read;TI"Gdata directly from the host, instead of via the <tt>waitfor()</tt>;TI"Dmechanism. Note that if you do use <tt>sysread()</tt> directly;TI"Ewhen in telnet mode, you should probably pass the output through;TI"?<tt>preprocess()</tt> to extract telnet command sequences.;T@S; ; i;I" Overview;T@o; ;[ I"DThe telnet protocol allows a client to login remotely to a user;TI"Jaccount on a server and execute commands via a shell. The equivalent;TI"Cis done by creating a Net::Telnet class with the +Host+ option;TI"Dset to your host, calling #login() with your user and password,;TI"@issuing one or more #cmd() calls, and then calling #close();TI"@to end the session. The #waitfor(), #print(), #puts(), and;TI"A#write() methods, which #cmd() is implemented on top of, are;TI"=only needed if you are doing something more complicated.;T@o; ;[I"CA Net::Telnet object can also be used to connect to non-telnet;TI"@services, such as SMTP or HTTP. In this case, you normally;TI"=want to provide the +Port+ option to specify the port to;TI"Dconnect to, and set the +Telnetmode+ option to false to prevent;TI"Fthe client from attempting to interpret telnet command sequences.;TI"DGenerally, #login() will not work with other protocols, and you;TI",have to handle authentication yourself.;T@o; ;[I"DFor some protocols, it will be possible to specify the +Prompt+;TI"Hoption once when you create the Telnet object and use #cmd() calls;;TI"Bfor others, you will have to specify the response sequence to;TI"?look for as the Match option to every #cmd() call, or call;TI"C#puts() and #waitfor() directly; for yet others, you will have;TI"=to use #sysread() instead of #waitfor() and parse server;TI"responses yourself.;T@o; ;[I"FIt is worth noting that when you create a new Net::Telnet object,;TI"Byou can supply a proxy IO channel via the Proxy option. This;TI"Ecan be used to attach the Telnet object to other Telnet objects,;TI"Cto already open sockets, or to any read-write IO object. This;TI"Ccan be useful, for instance, for setting up a test fixture for;TI"unit testing.;T@S; ; i;I" Examples;T@S; ; i;I"<Log in and send a command, echoing all output to stdout;T@o:RDoc::Markup::Verbatim;[I"9localhost = Net::Telnet::new("Host" => "localhost", ;FI"3 "Timeout" => 10, ;FI"< "Prompt" => /[$%#>] \z/n) ;FI"=localhost.login("username", "password") { |c| print c } ;FI".localhost.cmd("command") { |c| print c } ;FI"localhost.close ;FS; ; i;I"/Check a POP server to see if you have mail;T@o;;[I"Dpop = Net::Telnet::new("Host" => "your_destination_host_here", ;FI"+ "Port" => 110, ;FI"3 "Telnetmode" => false, ;FI"2 "Prompt" => /^\+OK/n) ;FI"=pop.cmd("user " + "your_username_here") { |c| print c } ;FI"=pop.cmd("pass " + "your_password_here") { |c| print c } ;FI"%pop.cmd("list") { |c| print c } ;FS; ; i;I"References;T@o; ;[ I"FThere are a large number of RFCs relevant to the Telnet protocol.;TI"CRFCs 854-861 define the base protocol. For a complete listing;TI"of relevant RFCs, see;TI"Ahttp://www.omnifarious.org/~hopper/technical/telnet-rfc.html;T: @fileI"lib/net/telnet.rb;T;0[[ I" sock;FI"R;F:publicF@c[ [ [[I" class;F[[;[[I"new;F@c[:protected[ [:private[ [I" instance;F[[;[[I"binmode;F@c[I" binmode=;F@c[I" close;F@c[I"cmd;F@c[I" login;F@c[I"preprocess;F@c[I" print;F@c[I" puts;F@c[I"telnetmode;F@c[I"telnetmode=;F@c[I"waitfor;F@c[I" write;F@c[;[ [;[