NTLM

A library for NTLM authentication in Dart/Flutter.

Installing

Add the dependency to your pubspec.yaml file:

dependencies:
  ntlm: ^1.0.2

Example

import 'package:ntlm/ntlm.dart';

main() {
  NTLMClient client = new NTLMClient(
    domain: "",
    workstation: "LAPTOP",
    username: "User208",
    password: "password",
  );

  client.get("https://example.com/").then((res) {
    print(res.body);
  });
}

You can also pre-hash the password and use those results instead:

String lmPassword = lmHash("password");
String ntPassword = ntHash("password");

NTLMClient client = new NTLMClient(
  domain: "",
  workstation: "LAPTOP",
  username: "User208",
  lmPassword: lmPassword,
  ntPassword: ntPassword,
);

Acknowledgements

Created from templates made available by Stagehand under a BSD-style license.

The DES code is a port of Bouncy Castle's DES Engine.

Most of the NTLM response creation code is a port of SamDecrock/node-http-ntlm which itself is a port of mullender/python-ntlm.

Password hashing functions for the type 3 message are ports of the Java code on this page.

Libraries

ntlm
This is a library for NTLM authentication in Dart/Flutter. [...]