mirror of
https://github.com/RedTeamPentesting/adauth
synced 2026-06-08 12:20:46 +00:00
Fix linter errors
This commit is contained in:
committed by
Erik Geiser
parent
ee7e2146f9
commit
3a9cc94321
+1
-1
@@ -352,7 +352,6 @@ func addKeyToKeytab(kt *keytab.Keytab, username string, domain string, key strin
|
||||
|
||||
// ParseAESKey decodes the supplied hex Kerberos AES key and determines the key type.
|
||||
func ParseAESKey(key string) (keyBytes []byte, keyType int32, err error) {
|
||||
|
||||
keyBytes, err = hex.DecodeString(key)
|
||||
if err != nil {
|
||||
return nil, 0, fmt.Errorf("decode hex key: %w", err)
|
||||
@@ -366,5 +365,6 @@ func ParseAESKey(key string) (keyBytes []byte, keyType int32, err error) {
|
||||
default:
|
||||
return nil, 0, fmt.Errorf("invalid AES128/AES256 key")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ func DCERPCCredentials(ctx context.Context, creds *adauth.Credential, options *O
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("parse AES key: %w", err)
|
||||
}
|
||||
|
||||
return credential.NewFromEncryptionKeyBytes(creds.LogonNameWithUpperCaseDomain(), int(keyType), key), nil
|
||||
case creds.NTHash != "":
|
||||
options.debug("Authenticating with NT hash")
|
||||
|
||||
Reference in New Issue
Block a user