Documentation
¶
Overview ¶
Warning - This is generated code
Index ¶
- Constants
- type IsTelnetResponse
- type TelnetClient
- func (c *TelnetClient) Connect(ctx context.Context, host string, port int, username string, password string) (bool, error)
- func (c *TelnetClient) GetTelnetNTLMInfo(ctx context.Context, host string, port int) (*telnetmini.NTLMInfoResponse, error)
- func (c *TelnetClient) Info(ctx context.Context, host string, port int) (TelnetInfoResponse, error)
- type TelnetInfoResponse
Constants ¶
const ( IAC = 255 // Interpret As Command WILL = 251 // Will WONT = 252 // Won't DO = 253 // Do DONT = 254 // Don't SB = 250 // Subnegotiation Begin SE = 240 // Subnegotiation End ECHO = 1 // Echo SUPPRESS_GO_AHEAD = 3 // Suppress Go Ahead TERMINAL_TYPE = 24 // Terminal Type NAWS = 31 // Negotiate About Window Size ENCRYPT = 38 // Encryption option (0x26) )
Telnet protocol constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IsTelnetResponse ¶
IsTelnetResponse is the response from the IsTelnet function. this is returned by IsTelnet function. @example ```javascript const telnet = require('nuclei/telnet'); const isTelnet = telnet.IsTelnet('acme.com', 23); log(toJSON(isTelnet)); ```
type TelnetClient ¶ added in v3.4.7
type TelnetClient struct{}
TelnetClient is a client for Telnet servers. @example ```javascript const telnet = require('nuclei/telnet'); const client = new telnet.TelnetClient(); ```
func (*TelnetClient) Connect ¶ added in v3.4.7
func (c *TelnetClient) Connect(ctx context.Context, host string, port int, username string, password string) (bool, error)
Connect tries to connect to provided host and port with telnet. Optionally provides username and password for authentication. Returns state of connection. If the connection is successful, the function will return true, otherwise false. @example ```javascript const telnet = require('nuclei/telnet'); const client = new telnet.TelnetClient(); const connected = client.Connect('acme.com', 23, 'username', 'password'); ```
func (*TelnetClient) GetTelnetNTLMInfo ¶ added in v3.4.7
func (c *TelnetClient) GetTelnetNTLMInfo(ctx context.Context, host string, port int) (*telnetmini.NTLMInfoResponse, error)
GetTelnetNTLMInfo implements the Nmap telnet-ntlm-info.nse script functionality. This function uses the telnetmini library and SMB packet crafting functions to send MS-TNAP NTLM authentication requests with null credentials. It might work only on Microsoft Telnet servers. @example ```javascript const telnet = require('nuclei/telnet'); const client = new telnet.TelnetClient(); const ntlmInfo = client.GetTelnetNTLMInfo('acme.com', 23); log(toJSON(ntlmInfo)); ```
func (*TelnetClient) Info ¶ added in v3.4.7
func (c *TelnetClient) Info(ctx context.Context, host string, port int) (TelnetInfoResponse, error)
Info gathers information about the telnet server including encryption support. Uses the telnetmini library's DetectEncryption helper function. WARNING: The connection used for detection becomes unusable after this call. @example ```javascript const telnet = require('nuclei/telnet'); const client = new telnet.TelnetClient(); const info = client.Info('acme.com', 23); log(toJSON(info)); ```
type TelnetInfoResponse ¶ added in v3.4.7
TelnetInfoResponse is the response from the Info function. @example ```javascript const telnet = require('nuclei/telnet'); const client = new telnet.TelnetClient(); const info = client.Info('acme.com', 23); log(toJSON(info)); ```