ntlm 1.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new69

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.

1.0.0 #

  • Initial version

example/ntlm_example.dart

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);
  });
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ntlm: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ntlm/ntlm.dart';
  
Version Uploaded Documentation Archive
1.0.2 Feb 4, 2019 Go to the documentation of ntlm 1.0.2 Download ntlm 1.0.2 archive
1.0.1 Feb 4, 2019 Go to the documentation of ntlm 1.0.1 Download ntlm 1.0.1 archive
1.0.0 Feb 4, 2019 Go to the documentation of ntlm 1.0.0 Download ntlm 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
38
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
69
Learn more about scoring.

We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13+1

Platforms

Detected platforms: Flutter, other

Primary library: package:ntlm/ntlm.dart with components: io.

Health suggestions

Format lib/src/http.dart.

Run dartfmt to format lib/src/http.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
fixnum ^0.10.0 0.10.9
http ^0.12.0 0.12.0+1
pointycastle ^1.0.0 1.0.0
utf ^0.9.0 0.9.0+5
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.7
path 1.6.2
source_span 1.5.4
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test any