> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectdiscovery.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Kerberos

# Namespace: kerberos

## Table of contents

### Classes

* [Client](/templates/protocols/javascript/modules/kerberos.Client)
* [Config](/templates/protocols/javascript/modules/kerberos.Config)

### Interfaces

* [AuthorizationDataEntry](/templates/protocols/javascript/modules/kerberos.AuthorizationDataEntry)
* [BitString](/templates/protocols/javascript/modules/kerberos.BitString)
* [EncTicketPart](/templates/protocols/javascript/modules/kerberos.EncTicketPart)
* [EncryptedData](/templates/protocols/javascript/modules/kerberos.EncryptedData)
* [EncryptionKey](/templates/protocols/javascript/modules/kerberos.EncryptionKey)
* [EnumerateUserResponse](/templates/protocols/javascript/modules/kerberos.EnumerateUserResponse)
* [HostAddress](/templates/protocols/javascript/modules/kerberos.HostAddress)
* [LibDefaults](/templates/protocols/javascript/modules/kerberos.LibDefaults)
* [PrincipalName](/templates/protocols/javascript/modules/kerberos.PrincipalName)
* [Realm](/templates/protocols/javascript/modules/kerberos.Realm)
* [TGS](/templates/protocols/javascript/modules/kerberos.TGS)
* [Ticket](/templates/protocols/javascript/modules/kerberos.Ticket)
* [TransitedEncoding](/templates/protocols/javascript/modules/kerberos.TransitedEncoding)

### Functions

* [ASRepToHashcat](/templates/protocols/javascript/modules/kerberos#asreptohashcat)
* [CheckKrbError](/templates/protocols/javascript/modules/kerberos#checkkrberror)
* [NewKerberosClientFromString](/templates/protocols/javascript/modules/kerberos#newkerberosclientfromstring)
* [SendToKDC](/templates/protocols/javascript/modules/kerberos#sendtokdc)
* [TGStoHashcat](/templates/protocols/javascript/modules/kerberos#tgstohashcat)

## Functions

### ASRepToHashcat

▸ **ASRepToHashcat**(`asrep`): `string` | `null`

ASRepToHashcat converts an AS-REP message to a hashcat format

#### Parameters

| Name    | Type  |
| :------ | :---- |
| `asrep` | `any` |

#### Returns

`string` | `null`

#### Defined in

kerberos.ts:6

***

### CheckKrbError

▸ **CheckKrbError**(`b`): `Uint8Array` | `null`

CheckKrbError checks if the response bytes from the KDC are a KRBError.

#### Parameters

| Name | Type         |
| :--- | :----------- |
| `b`  | `Uint8Array` |

#### Returns

`Uint8Array` | `null`

#### Defined in

kerberos.ts:15

***

### NewKerberosClientFromString

▸ **NewKerberosClientFromString**(`cfg`): [`Client`](/templates/protocols/javascript/modules/kerberos.Client) | `null`

NewKerberosClientFromString creates a new kerberos client from a string
by parsing krb5.conf

#### Parameters

| Name  | Type     |
| :---- | :------- |
| `cfg` | `string` |

#### Returns

[`Client`](/templates/protocols/javascript/modules/kerberos.Client) | `null`

**`Example`**

```javascript theme={null}
const kerberos = require('nuclei/kerberos');
const client = kerberos.NewKerberosClientFromString(`
[libdefaults]
default_realm = ACME.COM
dns_lookup_kdc = true
`);
```

#### Defined in

kerberos.ts:34

***

### SendToKDC

▸ **SendToKDC**(`kclient`, `msg`): `string` | `null`

sendtokdc.go deals with actual sending and receiving responses from KDC
SendToKDC sends a message to the KDC and returns the response.
It first tries to send the message over TCP, and if that fails, it falls back to UDP.(and vice versa)

#### Parameters

| Name      | Type                                                                |
| :-------- | :------------------------------------------------------------------ |
| `kclient` | [`Client`](/templates/protocols/javascript/modules/kerberos.Client) |
| `msg`     | `string`                                                            |

#### Returns

`string` | `null`

**`Example`**

```javascript theme={null}
const kerberos = require('nuclei/kerberos');
const client = new kerberos.Client('acme.com');
const response = kerberos.SendToKDC(client, 'message');
```

#### Defined in

kerberos.ts:51

***

### TGStoHashcat

▸ **TGStoHashcat**(`tgs`, `username`): `string` | `null`

TGStoHashcat converts a TGS to a hashcat format.

#### Parameters

| Name       | Type     |
| :--------- | :------- |
| `tgs`      | `any`    |
| `username` | `string` |

#### Returns

`string` | `null`

#### Defined in

kerberos.ts:60
