10.2.1.1. Python Package: tanium_kit

Tanium Kit - Collection of python utility modules.

tanium_kit.text_type

alias of unicode

10.2.1.1.1. Module: tanium_kit.ask

tanium_kit.ask.NO_LIST = [u'no', u'n', u'false', u'0', 0, False]

List of possible “No” strings.

tanium_kit.ask.YES_LIST = [u'yes', u'y', u'ye', u'true', u'1', 1, True]

List of possible “True” strings.

tanium_kit.ask.ask(**kwargs)[source]
tanium_kit.ask.build_prompt(**kwargs)[source]
tanium_kit.ask.coerce_bool(m)[source]
tanium_kit.ask.get_prompter(**kwargs)[source]
tanium_kit.ask.get_response(prompter)[source]
tanium_kit.ask.process_response(**kwargs)[source]
tanium_kit.ask.secure_value(**kwargs)[source]
tanium_kit.ask.try_int(response)[source]
tanium_kit.ask.val_bool(**kwargs)[source]
tanium_kit.ask.val_choices(**kwargs)[source]
tanium_kit.ask.val_int(**kwargs)[source]

10.2.1.1.2. Module: tanium_kit.excel_writer

class tanium_kit.excel_writer.ExcelWriter[source]

Bases: object

CSV = u''
HEADERS = []
MSGS = []
ROWS = []
brief_l(l)[source]
create_csv(rows, headers, **kwargs)[source]
get_cr(**kwargs)[source]
process_firsts(headers, **kwargs)[source]
process_headers(rows, **kwargs)[source]
process_lasts(headers, **kwargs)[source]
process_rows(rows, **kwargs)[source]
process_skips(headers, **kwargs)[source]
run(rows, **kwargs)[source]
exception tanium_kit.excel_writer.ExcelWriterError[source]

Bases: exceptions.Exception

tanium_kit.excel_writer.fix_cr(v, cr)[source]

10.2.1.1.3. Module: tanium_kit.history_console

Interactive python console with full auto complete, history, and history file support.

class tanium_kit.history_console.HistoryConsole(locals=None, **kwargs)[source]

Bases: code.InteractiveConsole

Interactive python console with full auto complete, history, and history file support.

Examples

>>> HistoryConsole()
FILENAME = u'<console>'
HISTFILE = u'~/.console-history'
__init__(locals=None, **kwargs)[source]

Interactive python console with full auto complete, history, and history file support.

write_history(histfile)[source]

Write the history file.

10.2.1.1.4. Module: tanium_kit.ini_reader

IniReader.

class tanium_kit.ini_reader.IniReader[source]

Bases: object

IniReader.

BOOL_OPTS = [u'true', u'false', u'yes', u'no', u'on', u'off', 0, u'0', 1, u'1']
BOOL_TRUE = [u'true', u'yes', u'on', 1, u'1']
TEXT_PRE = u'__TEXT::'
_is_type(value, ptype)[source]

Try to set value to python type ptype.

_parser_type

alias of RawConfigParser

_tv(value)[source]

Cache to avoid transforming value too many times.

_value_cache = {}
is_bool(value)[source]

Check if the value is a bool.

is_float(value)[source]

Check if the value is a float.

is_int(value)[source]

Check if the value is an int.

is_none(value)[source]

Check if the value is a None.

is_txt(value)[source]

Check if the value begins with TEXT_PRE.

read(ini_path=None, ini_text=None, ini_handle=None, **kwargs)[source]

IniReader.

to_bool(value)[source]

Convert value to a bool.

to_txt(value)[source]

Convert a value to text, removing FORCE_TEXT::.

exception tanium_kit.ini_reader.IniReaderError[source]

Bases: exceptions.Exception

Reader exceptions.

10.2.1.1.5. Module: tanium_kit.log_filters

Die.

class tanium_kit.log_filters.RegexLogFilter(search_regex, **kwargs)[source]

Bases: logging.Filter

Die.

_EXC = None
_MODES = [u'skip', u'include', u'replace']
_TATTRS = [u'filter_mode', u'search_regex', u'replace_regex', u'description']
_TMPL_EXC = u'EXCEPTION {} in {}'
_TMPL_MODES = u'skip, include, replace'
_TMPL_NEWEXC = u'{}\n!!!! WRAPPED INITIAL {}'
_TMPL_PREVEXC = u'{}\n!!!! WRAPPED PREVIOUS {}'
_TMPL_THIS = u"Log Filter filter_mode: '{filter_mode}', search_regex: '{search_regex}', replace_regex: '{replace_regex}', description: '{description}'"
_TSTR = u"filter_mode: '{filter_mode}', search_regex: '{search_regex}', replace_regex: '{replace_regex}', description: '{description}'"
__init__(search_regex, **kwargs)[source]

Die.

convert_re(x)[source]

Die.

description = u'No description provided!'
filter(record)[source]

Die.

filter_mode = u'skip'
k = u'description'
regex_filter(msg)[source]

Die.

replace_regex = u''
search_regex = None
test_str = u'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
valid_test = u''

10.2.1.1.6. Module: tanium_kit.log_tanium

Die.

Notes

The tanium log will show LEVEL at the appropriate tanium log levels according to TaniumHandler.LOG_TAN_LVL_MAP.

When running from Taniums embedded python interpreter, stdout is not captured!

tanium_kit.log_tanium.LOG_TAN_FORMAT = u'[%(name)s] %(levelname)-8s %(message)s'

Format for the tanium log output.

tanium_kit.log_tanium.LOG_TAN_HANDLER_NAME = u'tanium_handler'

Name to label tanium handler with.

tanium_kit.log_tanium.LOG_TAN_LEVEL = u'DEBUG'

Set the tanium handler to DEBUG, let the logger control the actual level.

class tanium_kit.log_tanium.TaniumHandler(**kwargs)[source]

Bases: logging.Handler

Python logging handler for tanium logging that can be added to a python logger.

LOG_TAN_DEFAULT_LVL = 0

Show python logging levels that do not match in LOG_TAN_LVL_MAP in tanium log at level 0.

LOG_TAN_LVL_MAP = {40: 0, 10: 40, 20: 20, 50: 0, 30: 0}

Map of python logging levels to tanium logging levels.

__init__(**kwargs)[source]

Python logging handler for tanium logging that can be added to a python logger.

Parameters:
  • tanium_module (object) –
    • The tanium module as exposed from within the internal python environment of the Tanium Platform
  • levels (dict, optional) –
    • a dictionary that maps python logging levels to tanium log levels
emit(record)[source]

Used by a python logging handler to log messages.

send_it(lvl, msg)[source]

Die.

update_level_map(log_tan_lvl_map)[source]

Utility to update self.LOG_TAN_LVL_MAP.

class tanium_kit.log_tanium.TaniumStream[source]

Bases: object

Fake stream object for TaniumHandler.

tanium_kit.log_tanium.make_handler_tan(logger, **kwargs)[source]

Create and add a tanium output handler object to a logger.

Parameters:
  • logger (python logging logger object) –
    • python logging logger object
  • log_tan_format (str, optional) –
    • python logging formatter str to use for logging
    • default : Logging.LOG_TAN_FORMAT
  • log_tan_level (str, optional) –
    • python logging level to use for logging
    • default : Logging.LOG_TAN_LEVEL
  • log_tan_handler_name (str, optional) –
    • name to use for identifying handler
    • default : Logging.LOG_TAN_HANDLER_NAME
  • log_tan_lvl_map (dict, optional) –
  • log_tan_default_lvl (int, optional) –
Returns:

handler

  • handler created by this method

Return type:

python logging handler object

10.2.1.1.7. Module: tanium_kit.log_tools

Helper class for the python logging system.

tanium_kit.log_tools.LOGGER_LEVEL = u'DEBUG'

Level to set logger to.

tanium_kit.log_tools.LOGGER_NAME = u'logger'

Used to track name of logger.

tanium_kit.log_tools.LOGGER_PATH = u''

Path of python logger to fetch, empty fetches the root logger.

tanium_kit.log_tools.LOG_CON_FORMAT = u'[%(name)s] %(levelname)-8s %(message)s'

Format for the console output.

tanium_kit.log_tools.LOG_CON_HANDLER_NAME = u'console_handler'

Name to label console handler with.

tanium_kit.log_tools.LOG_CON_LEVEL = u'DEBUG'

Set the console handler to DEBUG, let the logger control the actual level.

tanium_kit.log_tools.LOG_CON_OUTPUT = <open file '<stdout>', mode 'w'>

Send console output to stdout.

tanium_kit.log_tools.LOG_FILE_COUNT = 5

Number of rolled over file logs to keep.

tanium_kit.log_tools.LOG_FILE_DIR = u''

Directory to store log files, if not absolute will be joined with cwd.

tanium_kit.log_tools.LOG_FILE_FORMAT = u'%(asctime)s [%(name)s] %(levelname)-8s %(message)s'

Format for the file log output

tanium_kit.log_tools.LOG_FILE_HANDLER_NAME = u'log_file_handler'

Name to label tanium handler with.

tanium_kit.log_tools.LOG_FILE_LEVEL = u'DEBUG'

Set the file handler to DEBUG, let the logger control the actual level.

tanium_kit.log_tools.LOG_FILE_MB = 10

MB of file log size before rollover.

tanium_kit.log_tools.LOG_FILE_NAME = u''

File name to use for file log, if not supplied the basename of LOGGER_NAME will be used.

tanium_kit.log_tools.LOG_GMTIME = True

Configure pythons logging interface to use gmtime for standardization.

tanium_kit.log_tools._remove_handler(logger, handler)[source]

Wrapper method to close file handles properly and remove handler from a logger.

Parameters:
  • logger (python logging logger object) –
    • python logging logger object to remove handler from
  • handler (python logging handler object) –
    • python logging handler object to remove from logger
tanium_kit.log_tools.add_handler(logger, handler)[source]

Add a handler object to a logger.

Parameters:
  • logger (python logging logger object) –
    • python logging logger object
  • handler (python logging handler object) –
    • python logging handler object to add to logger
tanium_kit.log_tools.all_loggers()[source]
tanium_kit.log_tools.config_verbosity(pre, verbosity)[source]

Configure verbose loggers depending on verbosity.

tanium_kit.log_tools.get_handler(logger, handler_name)[source]

Retrieve a handler object from a logger by name.

Parameters:
  • logger (python logging logger object) –
    • python logging logger object
  • handler_name (str) –
    • str of python logging handler name to remove from logger
Returns:

ret

  • obj if handler named handler_name is found, None otherwise

Return type:

obj or None

tanium_kit.log_tools.make_handler_con(logger, **kwargs)[source]

Create and add a console output handler object to a logger.

Parameters:
  • logger (python logging logger object) –
    • python logging logger object
  • log_con_format (str, optional) –
    • python logging formatter str to use for logging
    • default : Logging.LOG_CON_FORMAT
  • log_con_level (str, optional) –
    • python logging level to use for logging
    • default : Logging.LOG_CON_LEVEL
  • log_con_handler_name (str, optional) –
    • name to use for identifying handler
    • default : Logging.LOG_CON_HANDLER_NAME
  • log_con_output (stream, optional) –
    • stream to use for output (sys.stdout, sys.stderr)
    • default : Logging.LOG_CON_OUTPUT
Returns:

handler

  • handler created by this method

Return type:

python logging handler object

tanium_kit.log_tools.make_handler_file(logger, **kwargs)[source]

Create and add a file output handler object to a logger.

Parameters:
  • logger (python logging logger object) –
    • python logging logger object
  • log_file_format (str, optional) –
    • python logging formatter str to use for logging
    • default : Logging.LOG_FILE_FORMAT
  • log_file_level (str, optional) –
    • python logging level to use for logging
    • default : Logging.LOG_FILE_LEVEL
  • log_file_handler_name (str, optional) –
    • name to use for identifying handler
    • default : Logging.LOG_FILE_HANDLER_NAME
  • log_file_name (str, optional) –
    • filename to use for logging
    • uses basename of logger name if not supplied
    • default : Logging.LOG_FILE_NAME
  • log_file_dir (str, optional) –
    • dir to use for logging
    • uses absolute path of cwd if empty/not supplied
    • turns all paths into absolute paths from cwd if relative
    • default : Logging.LOG_FILE_DIR
  • log_file_count (int, optional) –
    • number of logs to keep when rolling logs over
    • default : Logging.LOG_FILE_COUNT
  • log_file_mb (int, optional) –
    • MB of file log size before rollover
    • default : Logging.LOG_FILE_MB
Returns:

handler

  • handler created by this method

Return type:

python logging handler object

tanium_kit.log_tools.make_logger(**kwargs)[source]

Create and add a file output handler object to a logger.

Parameters:
  • logger_name (str, optional) –
    • name to set for this logger (shown in logging output by default)
    • default : Logging.LOGGER_NAME
  • logger_level (str, optional) –
    • python logging level to use for logging
    • default : Logging.LOGGER_LEVEL
  • logger_path (str, optional) –
    • dot notation of logger path to make
    • empty str fetches the root logger
    • default : Logging.LOGGER_PATH
  • log_gmtime (bool, optional) –
    • True: use gmtime in logging output
    • False: use localtime in logging output
    • default : Logging.LOG_GMTIME
  • log_isolate (bool, optional) –
    • True: only this logger gets log messages sent to this logger
    • False: parents of this logger also get log messages sent to this logger
    • default : True
Returns:

logger

  • logger created by this method

Return type:

python logging logger object

tanium_kit.log_tools.match_loggers(m)[source]
tanium_kit.log_tools.match_loggers_add_handler(m, handler)[source]
tanium_kit.log_tools.match_loggers_set_level(m, level=u'DEBUG')[source]
tanium_kit.log_tools.remove_all_handlers(logger)[source]

Remove all handlers from a logger.

Parameters:logger (python logging logger object) –
  • python logging logger object to remove all handlers from
tanium_kit.log_tools.remove_handler(logger, handler_name)[source]

Remove a handler by name from a logger.

Parameters:
  • logger (python logging logger object) –
    • python logging logger object
  • handler_name (str) –
    • str of python logging handler name to remove from logger
tanium_kit.log_tools.set_format(o, **kwargs)[source]

Configure a python logging objects logging format.

Parameters:
  • o (object) –
    • python logging logger object
  • f (str, optional) –
    • str of logging format to set on o
tanium_kit.log_tools.set_level(o, l=u'DEBUG')[source]

Configure a python logging objects logging level.

Parameters:
  • o (object) –
    • python logging object (logger or handler)
  • l (str, optional) –
    • str of level to set on o
tanium_kit.log_tools.shutup_requests(loud=True, match=u'requests')[source]
tanium_kit.log_tools.use_gmtime()[source]

Configure pythons logging interface to use gmtime.

tanium_kit.log_tools.use_localtime()[source]

Configure pythons logging interface to use localtime.

10.2.1.1.8. Module: tanium_kit.pretty

Homegrown utility libraries for tanium_pam4.

tanium_kit.pretty.GUESS_MAP = {u'{': u'json', u'[': u'json', u'<': u'xml'}

Dict that maps first character in text to a given type if text_type == ‘guess’.

tanium_kit.pretty.TEXT_TYPE_MAP = {u'xml': [u'pretty_xml'], u'json': [u'pretty_json'], u'guess': [], u'brute': [u'pretty_xml', u'pretty_json']}

Dict that maps text_type to a list of functions to try to pretty text with.

tanium_kit.pretty.from_json(text, **kwargs)[source]

Die.

tanium_kit.pretty.from_xml(text, **kwargs)[source]

Die.

tanium_kit.pretty.pretty_json(text, **kwargs)[source]

Die.

tanium_kit.pretty.pretty_text(text, name=u'text', text_type=u'guess', **kwargs)[source]

Try to pretty text as text_type.

Notes

  • Errors during prettifying get wrapped, logged, and ignored.
  • If text_type is not in TEXT_TYPE_MAP, text is returned unchanged.
  • If text is empty, text is returned unchanged.
Parameters:
  • text (str) –
    • text to pretty
  • name (str, optional) –
    • human name to refer to text as
  • text_type (str, optional) –
    • default : guess
    • type of text to try and pretty as
Returns:

text

  • prettified text as text_type, if possible

Return type:

str

tanium_kit.pretty.pretty_xml(text, **kwargs)[source]

Die.

tanium_kit.pretty.to_json(obj, indent=2, sort_keys=True, skipkeys=True, **kwargs)[source]

Die.

tanium_kit.pretty.to_xml(obj, pretty=True, indent=u' ', **kwargs)[source]

Die.

10.2.1.1.9. Module: tanium_kit.pytanx

Pytan Extensions.

tanium_kit.pytanx.LOG = <logging.Logger object>

Usage – user_obj = get_user_obj(handler, taniumpy) check_allowed_roles(user_obj=user_obj, role_names=[“Question Author”]) check_required_role(user_obj=user_obj, role_name=”Administrator”)

tanium_kit.pytanx.check_allowed_roles(user_obj, role_names=[])[source]

Validate that the roles for user are in role_names.

tanium_kit.pytanx.check_required_role(user_obj, role_name=u'')[source]

Validate that one of the roles for user equals role.

tanium_kit.pytanx.get_user_obj(handler, taniumpy)[source]

Fetch the user info for user ID.

tanium_kit.pytanx.session_user_id(handler)[source]

Get the user ID from handler.session.session_id.

10.2.1.1.10. Module: tanium_kit.shell_parser

tanium_kit.shell_parser.FAIL_STR = (u'no', u'n', u'false', u'f', u'0')

from argparse import ArgumentDefaultsHelpFormatter as ArgFormatter from argparse import RawDescriptionHelpFormatter as RawFormatter

class CustomArgFormat(ArgFormatter, RawFormatter):

“”“Multiple inheritance Formatter class for argparse.ArgumentParser.

If a argparse.ArgumentParser class uses this as it’s Formatter class, it will show the defaults for each argument in the help output “”” pass

class tanium_kit.shell_parser.ShellParser(*args, **kwargs)[source]

Bases: argparse.ArgumentParser

_print_message(message, file=None)[source]
error(message)[source]
exit(status=0, message=None)[source]
print_help(**kwargs)[source]
tanium_kit.shell_parser.add_arg_group(parser, group_name, group_opts)[source]
tanium_kit.shell_parser.make_base_parser(script, doc, opts)[source]
tanium_kit.shell_parser.make_parser(script, doc, version, opts)[source]
tanium_kit.shell_parser.str2bool(v)[source]

10.2.1.1.11. Module: tanium_kit.store

Dict-like object class.

class tanium_kit.store.Store(*args, **kwargs)[source]

Bases: dict

Dict-like object class.

_HIDDEN = [u'password']
_MAX_VAL_LEN = 40
__delattr__(name)[source]

delattr() method.

__delitem__(name)[source]

Die.

__getattr__(name)[source]

getattr() method.

__getitem__(name)[source]

GetItem.

__init__(*args, **kwargs)[source]

Dict-like object class.

__repr__()[source]

repr() method.

__setattr__(name, value)[source]

setattr() method.

__setitem__(name, value)[source]

SetItem.

__str__()[source]

str() method.

gets(name, default=None)[source]

Get value of name, set to default if not exists.

10.2.1.1.12. Module: tanium_kit.tools

tanium_kit.tools.b64decode(text)[source]

Die.

tanium_kit.tools.b64encode(text)[source]

Die.

tanium_kit.tools.deobfuscate(text, key, **kwargs)[source]
tanium_kit.tools.dict_path(path, source)[source]
tanium_kit.tools.file_hash(path, hash_type=u'sha1', blocksize=65536)[source]
tanium_kit.tools.get_percentage(part, whole)[source]
tanium_kit.tools.get_valid_filename(s)[source]
tanium_kit.tools.int_check(value)[source]
tanium_kit.tools.obfuscate(text, key, **kwargs)[source]
tanium_kit.tools.orig_tb()[source]
tanium_kit.tools.read_file(path)[source]
tanium_kit.tools.resolve_path(path, source)[source]
tanium_kit.tools.vignere_cipher(text, key, inverse=False)[source]

Vigenere Cipher

The vigenere cipher is a symmetric key cipher that operates as a group of Caesar ciphers in sequence with different rotations:

KEY == boomboombo MESSAGE == helloworld CIPHERTEXT == jvopbrfqba
The basic formula is as follows:
E(m) = ((m1 + k1) % 26, (m2 + k2) % 26, ..., (mi + ki) % 26) D(m) = ((c1 - k1) % 26, (c2 - k2) % 26, ..., (ci - ki) % 26)

Like other naive ciphers, this shouldn’t be used. It is however the most secure naive cipher. It is helpful for obfuscation to prevent shoulder surfing and casual disk scanning of passwords.

tanium_kit.tools.write_binary(path, out)[source]
tanium_kit.tools.write_file(path, out)[source]
tanium_kit.tools.write_str_file(path, out)[source]
tanium_kit.tools.write_uni_file(path, out)[source]

10.2.1.1.13. Module: tanium_kit.version

Version info.

10.2.1.1.14. Module: tanium_kit.wequests

class tanium_kit.wequests.Wequests(**kwargs)[source]

Bases: object

DEFAULTS = {u'files': None, u'cookies': None, u'connect_secs': 5, u'stream': None, u'https_proxy': u'', u'verify': False, u'http_proxy': u'', u'json': None, u'proxies': {}, u'auth_failures': [401, 403], u'headers': {}, u'cert': None, u'params': None, u'hooks': None, u'allow_redirects': True, u'response_secs': 15, u'data': None, u'method': u'get'}
KWARGS = {}
LOUD = True
REQUESTS_PKG = None
USE_SESSION = True
_RS = None
request(url, **kwargs)[source]
exception tanium_kit.wequests.WequestsError[source]

Bases: exceptions.Exception

10.2.1.1.15. Module: tanium_kit.xml_cleaner

A regex based XML cleaner that will replace unsupported characters.

tanium_kit.xml_cleaner.DEFAULT_ENCODING = u'utf-8'

The default encoding to use if none supplied

tanium_kit.xml_cleaner.DEFAULT_REPLACEMENT = u'\ufffd'

The default character to use when replacing characters

tanium_kit.xml_cleaner.INVALID_UNICODE_RAW_RE = u'[^\t\n\r -\ud7ff\ue000-\ufffd]'

The raw regex string to use when replacing invalid characters

tanium_kit.xml_cleaner.INVALID_UNICODE_RE = <_sre.SRE_Pattern object>

The regex object to use when replacing invalid characters

tanium_kit.xml_cleaner.QUOTES_MAP = {u'\u2019': u"'", u'\u2018': u"'", u'\u201d': u'"', u'\u201c': u'"'}

Mapping of smart quotes to replace with their ascii counterpart.

tanium_kit.xml_cleaner.RESTRICT_UNICODE_RAW_RE = u'[\x7f-\x84\x86-\x9f\ufdd0-\ufdef]'

The raw regex string to use when replacing restricted characters

tanium_kit.xml_cleaner.RESTRICT_UNICODE_RE = <_sre.SRE_Pattern object>

The regex object to use when replacing restricted characters

tanium_kit.xml_cleaner.XML_1_0_RESTRICT_HEX = [[127, 132], [134, 159], [64976, 65007]]
Restricted/discouraged Unicode characters for XML documents – [#x7F-#x84],
[#x86-#x9F], [#xFDD0-#xFDEF], [#x1FFFE-#x1FFFF], [#x2FFFE-#x2FFFF], [#x3FFFE-#x3FFFF], [#x4FFFE-#x4FFFF], [#x5FFFE-#x5FFFF], [#x6FFFE-#x6FFFF], [#x7FFFE-#x7FFFF], [#x8FFFE-#x8FFFF], [#x9FFFE-#x9FFFF], [#xAFFFE-#xAFFFF], [#xBFFFE-#xBFFFF], [#xCFFFE-#xCFFFF], [#xDFFFE-#xDFFFF], [#xEFFFE-#xEFFFF], [#xFFFFE-#xFFFFF], [#x10FFFE-#x10FFFF]

Source: http://www.w3.org/TR/REC-xml/#NT-Char

tanium_kit.xml_cleaner.XML_1_0_RESTRICT_UNI_LIST = [u'\x7f-\x84', u'\x86-\x9f', u'\ufdd0-\ufdef']

A list of restricted unicode characters

tanium_kit.xml_cleaner.XML_1_0_RESTRICT_UNI_TEXT = u'\x7f-\x84\x86-\x9f\ufdd0-\ufdef'

The text string containing restricted unicode characters

tanium_kit.xml_cleaner.XML_1_0_VALID_HEX = [[9], [10], [13], [32, 55295], [57344, 65533]]
Valid Unicode characters for XML documents – (any Unicode character, excluding the surrogate blocks, FFFE, and FFFF)
#x9, #xA, #xD, [#x20-#xD7FF], [#xE000-#xFFFD], [#x10000-#x10FFFF]

Source: http://www.w3.org/TR/REC-xml/#NT-Char

tanium_kit.xml_cleaner.XML_1_0_VALID_UNI_LIST = [u'\t', u'\n', u'\r', u' -\ud7ff', u'\ue000-\ufffd']

A list of valid unicode characters

tanium_kit.xml_cleaner.XML_1_0_VALID_UNI_TEXT = u'\t\n\r -\ud7ff\ue000-\ufffd'

The text string containing valid unicode characters

tanium_kit.xml_cleaner.add_console_log()[source]

Die.

tanium_kit.xml_cleaner.bytes_to_str(text, **kwargs)[source]

Die.

tanium_kit.xml_cleaner.clean(text, **kwargs)[source]

Die.

tanium_kit.xml_cleaner.clean_chars(text, name, regex, **kwargs)[source]

Die.

tanium_kit.xml_cleaner.clean_quotes(text, name, **kwargs)[source]

Die.

tanium_kit.xml_cleaner.decode_recode(text, **kwargs)[source]

Die.

tanium_kit.xml_cleaner.get_etree()[source]

Die.

tanium_kit.xml_cleaner.str_to_bytes(text, **kwargs)[source]

Die.

10.2.1.1.16. Module: tanium_kit.zipper

tanium_kit.zipper.ZIP_ADD()

S.format(*args, **kwargs) -> unicode

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{‘ and ‘}’).

tanium_kit.zipper.ZIP_MAKE()

S.format(*args, **kwargs) -> unicode

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{‘ and ‘}’).

tanium_kit.zipper.ZIP_PATTERNS()

S.format(*args, **kwargs) -> unicode

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{‘ and ‘}’).

tanium_kit.zipper.ZIP_SKIP()

S.format(*args, **kwargs) -> unicode

Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces (‘{‘ and ‘}’).

tanium_kit.zipper.mkzip(zip_path, src_path, **kwargs)[source]
tanium_kit.zipper.skip_check(p, t, skips)[source]
tanium_kit.zipper.zip_info(zip_path, details=False)[source]
tanium_kit.zipper.zip_walk(zf, src_path, **kwargs)[source]