f.close()
MAX_NETBIOS_NAME_LEN = 15
+
+
def is_valid_netbios_char(c):
return (c.isalnum() or c in " !#$%&'()-.@^_{}~")
"""return a DN from a DNS name domain/forest root"""
return "DC=" + ",DC=".join(dnsdomain.split("."))
+
def current_unix_time():
return int(time.time())
+
def string_to_byte_array(string):
blob = [0] * len(string)
return blob
+
def arcfour_encrypt(key, data):
from samba.crypto import arcfour_crypt_blob
return arcfour_crypt_blob(data, key)