1
2
3
4
5
6
7
8
9
10
11
12
13
14 """
15 This module provides common utilities for monitoring Windows devices.
16 """
17
18 import pysamba.twisted.reactor
19
21 """
22 Adds the --ntlmv2auth option to the provided command-line parser.
23 @param parser: the command-line option parser to add the argument to
24 @type parser: OptionParser
25 """
26 parser.add_option('--ntlmv2auth',
27 dest='ntlmv2auth',
28 default=False,
29 action="store_true",
30 help="Enable NTLMv2 Authentication for Windows Devices")
31
33 """
34 Enables or disables NTLMv2 Authentication in the current process based
35 upon the setting of the ntlmv2auth option.
36 @param options: the command-line options object
37 """
38 flag = False
39 if getattr(options, 'ntlmv2auth', False):
40 flag = True
41 pysamba.twisted.reactor.setNTLMv2Authentication(flag)
42