12/**3* IsTelnet checks if a host is running a Telnet server.4* @example5* ```javascript6* const telnet = require('nuclei/telnet');7* const isTelnet = telnet.IsTelnet('acme.com', 23);8* log(toJSON(isTelnet));9* ```10*/11export function IsTelnet(host: string, port: number): IsTelnetResponse | null {12return null;13}1415/**16* TelnetClient is a client for Telnet servers.17* @example18* ```javascript19* const telnet = require('nuclei/telnet');20* const client = new telnet.TelnetClient();21* ```22*/23export class TelnetClient {2425/**26* Connect tries to connect to provided host and port with telnet.27* Optionally provides username and password for authentication.28* Returns state of connection. If the connection is successful,29* the function will return true, otherwise false.30* @example31* ```javascript32* const telnet = require('nuclei/telnet');33* const client = new telnet.TelnetClient();34* const connected = client.Connect('acme.com', 23, 'username', 'password');35* ```36*/37public Connect(host: string, port: number, username: string, password: string): boolean {38return false;39}4041/**42* Info gathers information about the telnet server including encryption support.43* Uses the telnetmini library's DetectEncryption helper function.44* WARNING: The connection used for detection becomes unusable after this call.45* @example46* ```javascript47* const telnet = require('nuclei/telnet');48* const client = new telnet.TelnetClient();49* const info = client.Info('acme.com', 23);50* log(toJSON(info));51* ```52*/53public Info(host: string, port: number): TelnetInfoResponse | null {54return null;55}5657/**58* GetTelnetNTLMInfo implements the Nmap telnet-ntlm-info.nse script functionality.59* This function uses the telnetmini library and SMB packet crafting functions to send60* MS-TNAP NTLM authentication requests with null credentials. It might work only on61* Microsoft Telnet servers.62* @example63* ```javascript64* const telnet = require('nuclei/telnet');65* const client = new telnet.TelnetClient();66* const ntlmInfo = client.GetTelnetNTLMInfo('acme.com', 23);67* log(toJSON(ntlmInfo));68* ```69*/70public GetTelnetNTLMInfo(host: string, port: number): NTLMInfoResponse | null {71return null;72}73}7475/**76* IsTelnetResponse is the response from the IsTelnet function.77* this is returned by IsTelnet function.78* @example79* ```javascript80* const telnet = require('nuclei/telnet');81* const isTelnet = telnet.IsTelnet('acme.com', 23);82* log(toJSON(isTelnet));83* ```84*/85export interface IsTelnetResponse {8687IsTelnet?: boolean,8889Banner?: string,90}9192/**93* TelnetInfoResponse is the response from the Info function.94* @example95* ```javascript96* const telnet = require('nuclei/telnet');97* const client = new telnet.TelnetClient();98* const info = client.Info('acme.com', 23);99* log(toJSON(info));100* ```101*/102export interface TelnetInfoResponse {103104SupportsEncryption?: boolean,105106Banner?: string,107108Options?: { [key: number]: number[] },109}110111/**112* NTLMInfoResponse represents the response from NTLM information gathering.113* This matches exactly the output structure from the Nmap telnet-ntlm-info.nse script.114* @example115* ```javascript116* const telnet = require('nuclei/telnet');117* const client = new telnet.TelnetClient();118* const ntlmInfo = client.GetTelnetNTLMInfo('acme.com', 23);119* log(toJSON(ntlmInfo));120* ```121*/122export interface NTLMInfoResponse {123124/**125* Target_Name from script (target_realm in script)126*/127TargetName?: string,128129/**130* NetBIOS_Domain_Name from script131*/132NetBIOSDomainName?: string,133134/**135* NetBIOS_Computer_Name from script136*/137NetBIOSComputerName?: string,138139/**140* DNS_Domain_Name from script141*/142DNSDomainName?: string,143144/**145* DNS_Computer_Name from script (fqdn in script)146*/147DNSComputerName?: string,148149/**150* DNS_Tree_Name from script (dns_forest_name in script)151*/152DNSTreeName?: string,153154/**155* Product_Version from script156*/157ProductVersion?: string,158159/**160* Raw timestamp for skew calculation161*/162Timestamp?: number,163}164165166167