def enable_ntlm_authentication(user = "", password = "", url = ""):
    print "[+][devalias.net] Enabling NTLM authentication support"
    # Import ntlm library
    try:
        # import ntlm
        from ntlm import HTTPNtlmAuthHandler
        print "[+][devalias.net][NTLM Authentication] NTLM Support Library Loaded!"
    except __HOLE__:
        print "[-][devalias.net][NTLM Authentication] Program could not find module : ntlm (Is the ntlm library installed/available locally?"
        sys.exit (1)

    try:
        from urlparse import urlparse, urlunparse
    except ImportError:
        print "[-][devalias.net][NTLM Authentication] Program could not find module : urlparse"
        sys.exit (1)

    if user == "":
        user = raw_input("[+][devalias.net][NTLM Authentication] Enter username (DOMAIN\username): ")
    if password == "":
        password = raw_input("[+][devalias.net][NTLM Authentication] Enter password: ")

    parsed_url = urlparse(url)
    base_uri = urlunparse((parsed_url[0],parsed_url[1],"","","",""))

    passman = urllib2.HTTPPasswordMgrWithDefaultRealm()
    passman.add_password(None, base_uri, user, password)
    # create the NTLM authentication handler
    auth_NTLM = HTTPNtlmAuthHandler.HTTPNtlmAuthHandler(passman)

    # other authentication handlers
    auth_basic = urllib2.HTTPBasicAuthHandler(passman)
    auth_digest = urllib2.HTTPDigestAuthHandler(passman)

    # disable proxies (if you want to stay within the corporate network)
    # proxy_handler = urllib2.ProxyHandler({})
    proxy_handler = urllib2.ProxyHandler()

    # create and install the opener
    opener = urllib2.build_opener(proxy_handler, auth_NTLM, auth_digest, auth_basic)
    urllib2.install_opener(opener)

    print "[+][devalias.net][NTLM authentication] Credentials enabled for " + user

# main routine to trigger sub routines (functions) !
dataset/ETHPy150Open alias1/sparty/sparty_v_0.1.py/enable_ntlm_authentication