repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
zmqless/python-zeroless | zeroless/zeroless.py | Sock.pub | def pub(self, topic=b'', embed_topic=False):
"""
Returns a callable that can be used to transmit a message, with a given
``topic``, in a publisher-subscriber fashion. Note that the sender
function has a ``print`` like signature, with an infinite number of
arguments. Each one bein... | python | def pub(self, topic=b'', embed_topic=False):
"""
Returns a callable that can be used to transmit a message, with a given
``topic``, in a publisher-subscriber fashion. Note that the sender
function has a ``print`` like signature, with an infinite number of
arguments. Each one bein... | [
"def",
"pub",
"(",
"self",
",",
"topic",
"=",
"b''",
",",
"embed_topic",
"=",
"False",
")",
":",
"if",
"not",
"isinstance",
"(",
"topic",
",",
"bytes",
")",
":",
"error",
"=",
"'Topic must be bytes'",
"log",
".",
"error",
"(",
"error",
")",
"raise",
... | Returns a callable that can be used to transmit a message, with a given
``topic``, in a publisher-subscriber fashion. Note that the sender
function has a ``print`` like signature, with an infinite number of
arguments. Each one being a part of the complete message.
By default, no topic w... | [
"Returns",
"a",
"callable",
"that",
"can",
"be",
"used",
"to",
"transmit",
"a",
"message",
"with",
"a",
"given",
"topic",
"in",
"a",
"publisher",
"-",
"subscriber",
"fashion",
".",
"Note",
"that",
"the",
"sender",
"function",
"has",
"a",
"print",
"like",
... | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L114-L141 |
zmqless/python-zeroless | zeroless/zeroless.py | Sock.sub | def sub(self, topics=(b'',)):
"""
Returns an iterable that can be used to iterate over incoming messages,
that were published with one of the topics specified in ``topics``. Note
that the iterable returns as many parts as sent by subscribed publishers.
:param topics: a list of t... | python | def sub(self, topics=(b'',)):
"""
Returns an iterable that can be used to iterate over incoming messages,
that were published with one of the topics specified in ``topics``. Note
that the iterable returns as many parts as sent by subscribed publishers.
:param topics: a list of t... | [
"def",
"sub",
"(",
"self",
",",
"topics",
"=",
"(",
"b''",
",",
")",
")",
":",
"sock",
"=",
"self",
".",
"__sock",
"(",
"zmq",
".",
"SUB",
")",
"for",
"topic",
"in",
"topics",
":",
"if",
"not",
"isinstance",
"(",
"topic",
",",
"bytes",
")",
":"... | Returns an iterable that can be used to iterate over incoming messages,
that were published with one of the topics specified in ``topics``. Note
that the iterable returns as many parts as sent by subscribed publishers.
:param topics: a list of topics to subscribe to (default=b'')
:type ... | [
"Returns",
"an",
"iterable",
"that",
"can",
"be",
"used",
"to",
"iterate",
"over",
"incoming",
"messages",
"that",
"were",
"published",
"with",
"one",
"of",
"the",
"topics",
"specified",
"in",
"topics",
".",
"Note",
"that",
"the",
"iterable",
"returns",
"as"... | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L143-L162 |
zmqless/python-zeroless | zeroless/zeroless.py | Sock.push | def push(self):
"""
Returns a callable that can be used to transmit a message in a push-pull
fashion. Note that the sender function has a ``print`` like signature,
with an infinite number of arguments. Each one being a part of the
complete message.
:rtype: function
... | python | def push(self):
"""
Returns a callable that can be used to transmit a message in a push-pull
fashion. Note that the sender function has a ``print`` like signature,
with an infinite number of arguments. Each one being a part of the
complete message.
:rtype: function
... | [
"def",
"push",
"(",
"self",
")",
":",
"sock",
"=",
"self",
".",
"__sock",
"(",
"zmq",
".",
"PUSH",
")",
"return",
"self",
".",
"__send_function",
"(",
"sock",
")"
] | Returns a callable that can be used to transmit a message in a push-pull
fashion. Note that the sender function has a ``print`` like signature,
with an infinite number of arguments. Each one being a part of the
complete message.
:rtype: function | [
"Returns",
"a",
"callable",
"that",
"can",
"be",
"used",
"to",
"transmit",
"a",
"message",
"in",
"a",
"push",
"-",
"pull",
"fashion",
".",
"Note",
"that",
"the",
"sender",
"function",
"has",
"a",
"print",
"like",
"signature",
"with",
"an",
"infinite",
"n... | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L165-L175 |
zmqless/python-zeroless | zeroless/zeroless.py | Sock.pull | def pull(self):
"""
Returns an iterable that can be used to iterate over incoming messages,
that were pushed by a push socket. Note that the iterable returns as
many parts as sent by pushers.
:rtype: generator
"""
sock = self.__sock(zmq.PULL)
return self.... | python | def pull(self):
"""
Returns an iterable that can be used to iterate over incoming messages,
that were pushed by a push socket. Note that the iterable returns as
many parts as sent by pushers.
:rtype: generator
"""
sock = self.__sock(zmq.PULL)
return self.... | [
"def",
"pull",
"(",
"self",
")",
":",
"sock",
"=",
"self",
".",
"__sock",
"(",
"zmq",
".",
"PULL",
")",
"return",
"self",
".",
"__recv_generator",
"(",
"sock",
")"
] | Returns an iterable that can be used to iterate over incoming messages,
that were pushed by a push socket. Note that the iterable returns as
many parts as sent by pushers.
:rtype: generator | [
"Returns",
"an",
"iterable",
"that",
"can",
"be",
"used",
"to",
"iterate",
"over",
"incoming",
"messages",
"that",
"were",
"pushed",
"by",
"a",
"push",
"socket",
".",
"Note",
"that",
"the",
"iterable",
"returns",
"as",
"many",
"parts",
"as",
"sent",
"by",
... | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L177-L186 |
zmqless/python-zeroless | zeroless/zeroless.py | Sock.request | def request(self):
"""
Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages,
that were replied by a reply socket. Note that the iterable returns
as many parts as sent by repliers. Also, the sender func... | python | def request(self):
"""
Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages,
that were replied by a reply socket. Note that the iterable returns
as many parts as sent by repliers. Also, the sender func... | [
"def",
"request",
"(",
"self",
")",
":",
"sock",
"=",
"self",
".",
"__sock",
"(",
"zmq",
".",
"REQ",
")",
"return",
"self",
".",
"__send_function",
"(",
"sock",
")",
",",
"self",
".",
"__recv_generator",
"(",
"sock",
")"
] | Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages,
that were replied by a reply socket. Note that the iterable returns
as many parts as sent by repliers. Also, the sender function has a
``print`` like signa... | [
"Returns",
"a",
"callable",
"and",
"an",
"iterable",
"respectively",
".",
"Those",
"can",
"be",
"used",
"to",
"both",
"transmit",
"a",
"message",
"and",
"/",
"or",
"iterate",
"over",
"incoming",
"messages",
"that",
"were",
"replied",
"by",
"a",
"reply",
"s... | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L189-L201 |
zmqless/python-zeroless | zeroless/zeroless.py | Sock.reply | def reply(self):
"""
Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages,
that were requested by a request socket. Note that the iterable returns
as many parts as sent by requesters. Also, the sender ... | python | def reply(self):
"""
Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages,
that were requested by a request socket. Note that the iterable returns
as many parts as sent by requesters. Also, the sender ... | [
"def",
"reply",
"(",
"self",
")",
":",
"sock",
"=",
"self",
".",
"__sock",
"(",
"zmq",
".",
"REP",
")",
"return",
"self",
".",
"__send_function",
"(",
"sock",
")",
",",
"self",
".",
"__recv_generator",
"(",
"sock",
")"
] | Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages,
that were requested by a request socket. Note that the iterable returns
as many parts as sent by requesters. Also, the sender function has a
``print`` like... | [
"Returns",
"a",
"callable",
"and",
"an",
"iterable",
"respectively",
".",
"Those",
"can",
"be",
"used",
"to",
"both",
"transmit",
"a",
"message",
"and",
"/",
"or",
"iterate",
"over",
"incoming",
"messages",
"that",
"were",
"requested",
"by",
"a",
"request",
... | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L203-L215 |
zmqless/python-zeroless | zeroless/zeroless.py | Sock.pair | def pair(self):
"""
Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages, that were
sent by a pair socket. Note that the iterable returns as many parts as
sent by a pair. Also, the sender function has ... | python | def pair(self):
"""
Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages, that were
sent by a pair socket. Note that the iterable returns as many parts as
sent by a pair. Also, the sender function has ... | [
"def",
"pair",
"(",
"self",
")",
":",
"sock",
"=",
"self",
".",
"__sock",
"(",
"zmq",
".",
"PAIR",
")",
"return",
"self",
".",
"__send_function",
"(",
"sock",
")",
",",
"self",
".",
"__recv_generator",
"(",
"sock",
")"
] | Returns a callable and an iterable respectively. Those can be used to
both transmit a message and/or iterate over incoming messages, that were
sent by a pair socket. Note that the iterable returns as many parts as
sent by a pair. Also, the sender function has a ``print`` like signature,
... | [
"Returns",
"a",
"callable",
"and",
"an",
"iterable",
"respectively",
".",
"Those",
"can",
"be",
"used",
"to",
"both",
"transmit",
"a",
"message",
"and",
"/",
"or",
"iterate",
"over",
"incoming",
"messages",
"that",
"were",
"sent",
"by",
"a",
"pair",
"socke... | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L218-L230 |
zmqless/python-zeroless | zeroless/zeroless.py | Client.connect | def connect(self, ip, port):
"""
Connects to a server at the specified ip and port.
:param ip: an IP address
:type ip: str or unicode
:param port: port number from 1024 up to 65535
:type port: int
:rtype: self
"""
_check_valid_port_range(port)
... | python | def connect(self, ip, port):
"""
Connects to a server at the specified ip and port.
:param ip: an IP address
:type ip: str or unicode
:param port: port number from 1024 up to 65535
:type port: int
:rtype: self
"""
_check_valid_port_range(port)
... | [
"def",
"connect",
"(",
"self",
",",
"ip",
",",
"port",
")",
":",
"_check_valid_port_range",
"(",
"port",
")",
"address",
"=",
"(",
"ip",
",",
"port",
")",
"if",
"address",
"in",
"self",
".",
"_addresses",
":",
"error",
"=",
"'Already connected to {0} on po... | Connects to a server at the specified ip and port.
:param ip: an IP address
:type ip: str or unicode
:param port: port number from 1024 up to 65535
:type port: int
:rtype: self | [
"Connects",
"to",
"a",
"server",
"at",
"the",
"specified",
"ip",
"and",
"port",
"."
] | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L269-L296 |
zmqless/python-zeroless | zeroless/zeroless.py | Client.disconnect | def disconnect(self, ip, port):
"""
Disconnects from a server at the specified ip and port.
:param ip: an IP address
:type ip: str or unicode
:param port: port number from 1024 up to 65535
:type port: int
:rtype: self
"""
_check_valid_port_range(p... | python | def disconnect(self, ip, port):
"""
Disconnects from a server at the specified ip and port.
:param ip: an IP address
:type ip: str or unicode
:param port: port number from 1024 up to 65535
:type port: int
:rtype: self
"""
_check_valid_port_range(p... | [
"def",
"disconnect",
"(",
"self",
",",
"ip",
",",
"port",
")",
":",
"_check_valid_port_range",
"(",
"port",
")",
"address",
"=",
"(",
"ip",
",",
"port",
")",
"try",
":",
"self",
".",
"_addresses",
".",
"remove",
"(",
"address",
")",
"except",
"ValueErr... | Disconnects from a server at the specified ip and port.
:param ip: an IP address
:type ip: str or unicode
:param port: port number from 1024 up to 65535
:type port: int
:rtype: self | [
"Disconnects",
"from",
"a",
"server",
"at",
"the",
"specified",
"ip",
"and",
"port",
"."
] | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L308-L331 |
zmqless/python-zeroless | zeroless/zeroless.py | Client.disconnect_all | def disconnect_all(self):
"""
Disconnects from all connected servers.
:rtype: self
"""
addresses = deepcopy(self._addresses)
for ip, port in addresses:
self.disconnect(ip, port)
return self | python | def disconnect_all(self):
"""
Disconnects from all connected servers.
:rtype: self
"""
addresses = deepcopy(self._addresses)
for ip, port in addresses:
self.disconnect(ip, port)
return self | [
"def",
"disconnect_all",
"(",
"self",
")",
":",
"addresses",
"=",
"deepcopy",
"(",
"self",
".",
"_addresses",
")",
"for",
"ip",
",",
"port",
"in",
"addresses",
":",
"self",
".",
"disconnect",
"(",
"ip",
",",
"port",
")",
"return",
"self"
] | Disconnects from all connected servers.
:rtype: self | [
"Disconnects",
"from",
"all",
"connected",
"servers",
".",
":",
"rtype",
":",
"self"
] | train | https://github.com/zmqless/python-zeroless/blob/bff8ce0d12aae36537f41b57b2bd4ee087ed70e2/zeroless/zeroless.py#L343-L353 |
azaitsev/millify | millify/__init__.py | remove_exponent | def remove_exponent(d):
"""Remove exponent."""
return d.quantize(Decimal(1)) if d == d.to_integral() else d.normalize() | python | def remove_exponent(d):
"""Remove exponent."""
return d.quantize(Decimal(1)) if d == d.to_integral() else d.normalize() | [
"def",
"remove_exponent",
"(",
"d",
")",
":",
"return",
"d",
".",
"quantize",
"(",
"Decimal",
"(",
"1",
")",
")",
"if",
"d",
"==",
"d",
".",
"to_integral",
"(",
")",
"else",
"d",
".",
"normalize",
"(",
")"
] | Remove exponent. | [
"Remove",
"exponent",
"."
] | train | https://github.com/azaitsev/millify/blob/69f83ad6e15b79f073fcdec21358f255473eb518/millify/__init__.py#L11-L13 |
azaitsev/millify | millify/__init__.py | millify | def millify(n, precision=0, drop_nulls=True, prefixes=[]):
"""Humanize number."""
millnames = ['', 'k', 'M', 'B', 'T', 'P', 'E', 'Z', 'Y']
if prefixes:
millnames = ['']
millnames.extend(prefixes)
n = float(n)
millidx = max(0, min(len(millnames) - 1,
int(math.... | python | def millify(n, precision=0, drop_nulls=True, prefixes=[]):
"""Humanize number."""
millnames = ['', 'k', 'M', 'B', 'T', 'P', 'E', 'Z', 'Y']
if prefixes:
millnames = ['']
millnames.extend(prefixes)
n = float(n)
millidx = max(0, min(len(millnames) - 1,
int(math.... | [
"def",
"millify",
"(",
"n",
",",
"precision",
"=",
"0",
",",
"drop_nulls",
"=",
"True",
",",
"prefixes",
"=",
"[",
"]",
")",
":",
"millnames",
"=",
"[",
"''",
",",
"'k'",
",",
"'M'",
",",
"'B'",
",",
"'T'",
",",
"'P'",
",",
"'E'",
",",
"'Z'",
... | Humanize number. | [
"Humanize",
"number",
"."
] | train | https://github.com/azaitsev/millify/blob/69f83ad6e15b79f073fcdec21358f255473eb518/millify/__init__.py#L16-L28 |
azaitsev/millify | millify/__init__.py | prettify | def prettify(amount, separator=','):
"""Separate with predefined separator."""
orig = str(amount)
new = re.sub("^(-?\d+)(\d{3})", "\g<1>{0}\g<2>".format(separator), str(amount))
if orig == new:
return new
else:
return prettify(new) | python | def prettify(amount, separator=','):
"""Separate with predefined separator."""
orig = str(amount)
new = re.sub("^(-?\d+)(\d{3})", "\g<1>{0}\g<2>".format(separator), str(amount))
if orig == new:
return new
else:
return prettify(new) | [
"def",
"prettify",
"(",
"amount",
",",
"separator",
"=",
"','",
")",
":",
"orig",
"=",
"str",
"(",
"amount",
")",
"new",
"=",
"re",
".",
"sub",
"(",
"\"^(-?\\d+)(\\d{3})\"",
",",
"\"\\g<1>{0}\\g<2>\"",
".",
"format",
"(",
"separator",
")",
",",
"str",
... | Separate with predefined separator. | [
"Separate",
"with",
"predefined",
"separator",
"."
] | train | https://github.com/azaitsev/millify/blob/69f83ad6e15b79f073fcdec21358f255473eb518/millify/__init__.py#L31-L38 |
the01/python-flotils | flotils/loadable.py | load_json | def load_json(json_data, decoder=None):
"""
Load data from json string
:param json_data: Stringified json object
:type json_data: str | unicode
:param decoder: Use custom json decoder
:type decoder: T <= DateTimeDecoder
:return: Json data
:rtype: None | int | float | str | list | dict
... | python | def load_json(json_data, decoder=None):
"""
Load data from json string
:param json_data: Stringified json object
:type json_data: str | unicode
:param decoder: Use custom json decoder
:type decoder: T <= DateTimeDecoder
:return: Json data
:rtype: None | int | float | str | list | dict
... | [
"def",
"load_json",
"(",
"json_data",
",",
"decoder",
"=",
"None",
")",
":",
"if",
"decoder",
"is",
"None",
":",
"decoder",
"=",
"DateTimeDecoder",
"return",
"json",
".",
"loads",
"(",
"json_data",
",",
"object_hook",
"=",
"decoder",
".",
"decode",
")"
] | Load data from json string
:param json_data: Stringified json object
:type json_data: str | unicode
:param decoder: Use custom json decoder
:type decoder: T <= DateTimeDecoder
:return: Json data
:rtype: None | int | float | str | list | dict | [
"Load",
"data",
"from",
"json",
"string"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L131-L144 |
the01/python-flotils | flotils/loadable.py | load_json_file | def load_json_file(file, decoder=None):
"""
Load data from json file
:param file: Readable object or path to file
:type file: FileIO | str
:param decoder: Use custom json decoder
:type decoder: T <= DateTimeDecoder
:return: Json data
:rtype: None | int | float | str | list | dict
""... | python | def load_json_file(file, decoder=None):
"""
Load data from json file
:param file: Readable object or path to file
:type file: FileIO | str
:param decoder: Use custom json decoder
:type decoder: T <= DateTimeDecoder
:return: Json data
:rtype: None | int | float | str | list | dict
""... | [
"def",
"load_json_file",
"(",
"file",
",",
"decoder",
"=",
"None",
")",
":",
"if",
"decoder",
"is",
"None",
":",
"decoder",
"=",
"DateTimeDecoder",
"if",
"not",
"hasattr",
"(",
"file",
",",
"\"read\"",
")",
":",
"with",
"io",
".",
"open",
"(",
"file",
... | Load data from json file
:param file: Readable object or path to file
:type file: FileIO | str
:param decoder: Use custom json decoder
:type decoder: T <= DateTimeDecoder
:return: Json data
:rtype: None | int | float | str | list | dict | [
"Load",
"data",
"from",
"json",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L147-L163 |
the01/python-flotils | flotils/loadable.py | save_json | def save_json(val, pretty=False, sort=True, encoder=None):
"""
Save data to json string
:param val: Value or struct to save
:type val: None | int | float | str | list | dict
:param pretty: Format data to be readable (default: False)
otherwise going to be compact
:type pretty... | python | def save_json(val, pretty=False, sort=True, encoder=None):
"""
Save data to json string
:param val: Value or struct to save
:type val: None | int | float | str | list | dict
:param pretty: Format data to be readable (default: False)
otherwise going to be compact
:type pretty... | [
"def",
"save_json",
"(",
"val",
",",
"pretty",
"=",
"False",
",",
"sort",
"=",
"True",
",",
"encoder",
"=",
"None",
")",
":",
"if",
"encoder",
"is",
"None",
":",
"encoder",
"=",
"DateTimeEncoder",
"if",
"pretty",
":",
"data",
"=",
"json",
".",
"dumps... | Save data to json string
:param val: Value or struct to save
:type val: None | int | float | str | list | dict
:param pretty: Format data to be readable (default: False)
otherwise going to be compact
:type pretty: bool
:param sort: Sort keys (default: True)
:type sort: bool
... | [
"Save",
"data",
"to",
"json",
"string"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L166-L201 |
the01/python-flotils | flotils/loadable.py | save_json_file | def save_json_file(
file, val,
pretty=False, compact=True, sort=True, encoder=None
):
"""
Save data to json file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | list | dict
... | python | def save_json_file(
file, val,
pretty=False, compact=True, sort=True, encoder=None
):
"""
Save data to json file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | list | dict
... | [
"def",
"save_json_file",
"(",
"file",
",",
"val",
",",
"pretty",
"=",
"False",
",",
"compact",
"=",
"True",
",",
"sort",
"=",
"True",
",",
"encoder",
"=",
"None",
")",
":",
"# TODO: make pretty/compact into one bool?",
"if",
"encoder",
"is",
"None",
":",
"... | Save data to json file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | list | dict
:param pretty: Format data to be readable (default: False)
:type pretty: bool
:param compact: Format d... | [
"Save",
"data",
"to",
"json",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L204-L257 |
the01/python-flotils | flotils/loadable.py | load_yaml_file | def load_yaml_file(file):
"""
Load data from yaml file
:param file: Readable object or path to file
:type file: FileIO | str | unicode
:return: Yaml data
:rtype: None | int | float | str | unicode | list | dict
"""
if not hasattr(file, "read"):
with io.open(file, "r", encoding="... | python | def load_yaml_file(file):
"""
Load data from yaml file
:param file: Readable object or path to file
:type file: FileIO | str | unicode
:return: Yaml data
:rtype: None | int | float | str | unicode | list | dict
"""
if not hasattr(file, "read"):
with io.open(file, "r", encoding="... | [
"def",
"load_yaml_file",
"(",
"file",
")",
":",
"if",
"not",
"hasattr",
"(",
"file",
",",
"\"read\"",
")",
":",
"with",
"io",
".",
"open",
"(",
"file",
",",
"\"r\"",
",",
"encoding",
"=",
"\"utf-8\"",
")",
"as",
"f",
":",
"return",
"yaml",
".",
"lo... | Load data from yaml file
:param file: Readable object or path to file
:type file: FileIO | str | unicode
:return: Yaml data
:rtype: None | int | float | str | unicode | list | dict | [
"Load",
"data",
"from",
"yaml",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L272-L284 |
the01/python-flotils | flotils/loadable.py | save_yaml_file | def save_yaml_file(file, val):
"""
Save data to yaml file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | unicode | list | dict
"""
opened = False
if not hasattr(file, "write")... | python | def save_yaml_file(file, val):
"""
Save data to yaml file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | unicode | list | dict
"""
opened = False
if not hasattr(file, "write")... | [
"def",
"save_yaml_file",
"(",
"file",
",",
"val",
")",
":",
"opened",
"=",
"False",
"if",
"not",
"hasattr",
"(",
"file",
",",
"\"write\"",
")",
":",
"file",
"=",
"io",
".",
"open",
"(",
"file",
",",
"\"w\"",
",",
"encoding",
"=",
"\"utf-8\"",
")",
... | Save data to yaml file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | unicode | list | dict | [
"Save",
"data",
"to",
"yaml",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L299-L318 |
the01/python-flotils | flotils/loadable.py | load_file | def load_file(path):
"""
Load file
:param path: Path to file
:type path: str | unicode
:return: Loaded data
:rtype: None | int | float | str | unicode | list | dict
:raises IOError: If file not found or error accessing file
"""
res = {}
if not path:
IOError("No path spe... | python | def load_file(path):
"""
Load file
:param path: Path to file
:type path: str | unicode
:return: Loaded data
:rtype: None | int | float | str | unicode | list | dict
:raises IOError: If file not found or error accessing file
"""
res = {}
if not path:
IOError("No path spe... | [
"def",
"load_file",
"(",
"path",
")",
":",
"res",
"=",
"{",
"}",
"if",
"not",
"path",
":",
"IOError",
"(",
"\"No path specified to save\"",
")",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"path",
")",
":",
"raise",
"IOError",
"(",
"\"File not ... | Load file
:param path: Path to file
:type path: str | unicode
:return: Loaded data
:rtype: None | int | float | str | unicode | list | dict
:raises IOError: If file not found or error accessing file | [
"Load",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L321-L349 |
the01/python-flotils | flotils/loadable.py | save_file | def save_file(path, data, readable=False):
"""
Save to file
:param path: File path to save
:type path: str | unicode
:param data: Data to save
:type data: None | int | float | str | unicode | list | dict
:param readable: Format file to be human readable (default: False)
:type readable: ... | python | def save_file(path, data, readable=False):
"""
Save to file
:param path: File path to save
:type path: str | unicode
:param data: Data to save
:type data: None | int | float | str | unicode | list | dict
:param readable: Format file to be human readable (default: False)
:type readable: ... | [
"def",
"save_file",
"(",
"path",
",",
"data",
",",
"readable",
"=",
"False",
")",
":",
"if",
"not",
"path",
":",
"IOError",
"(",
"\"No path specified to save\"",
")",
"try",
":",
"with",
"io",
".",
"open",
"(",
"path",
",",
"\"w\"",
",",
"encoding",
"=... | Save to file
:param path: File path to save
:type path: str | unicode
:param data: Data to save
:type data: None | int | float | str | unicode | list | dict
:param readable: Format file to be human readable (default: False)
:type readable: bool
:rtype: None
:raises IOError: If empty pat... | [
"Save",
"to",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L352-L383 |
the01/python-flotils | flotils/loadable.py | join_path_prefix | def join_path_prefix(path, pre_path=None):
"""
If path set and not absolute, append it to pre path (if used)
:param path: path to append
:type path: str | None
:param pre_path: Base path to append to (default: None)
:type pre_path: None | str
:return: Path or appended path
:rtype: str |... | python | def join_path_prefix(path, pre_path=None):
"""
If path set and not absolute, append it to pre path (if used)
:param path: path to append
:type path: str | None
:param pre_path: Base path to append to (default: None)
:type pre_path: None | str
:return: Path or appended path
:rtype: str |... | [
"def",
"join_path_prefix",
"(",
"path",
",",
"pre_path",
"=",
"None",
")",
":",
"if",
"not",
"path",
":",
"return",
"path",
"if",
"pre_path",
"and",
"not",
"os",
".",
"path",
".",
"isabs",
"(",
"path",
")",
":",
"return",
"os",
".",
"path",
".",
"j... | If path set and not absolute, append it to pre path (if used)
:param path: path to append
:type path: str | None
:param pre_path: Base path to append to (default: None)
:type pre_path: None | str
:return: Path or appended path
:rtype: str | None | [
"If",
"path",
"set",
"and",
"not",
"absolute",
"append",
"it",
"to",
"pre",
"path",
"(",
"if",
"used",
")"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L386-L403 |
the01/python-flotils | flotils/loadable.py | Loadable._load_json_file | def _load_json_file(self, file, decoder=None):
"""
Load data from json file
:param file: Readable file or path to file
:type file: FileIO | str | unicode
:param decoder: Use custom json decoder
:type decoder: T <= flotils.loadable.DateTimeDecoder
:return: Json da... | python | def _load_json_file(self, file, decoder=None):
"""
Load data from json file
:param file: Readable file or path to file
:type file: FileIO | str | unicode
:param decoder: Use custom json decoder
:type decoder: T <= flotils.loadable.DateTimeDecoder
:return: Json da... | [
"def",
"_load_json_file",
"(",
"self",
",",
"file",
",",
"decoder",
"=",
"None",
")",
":",
"try",
":",
"res",
"=",
"load_json_file",
"(",
"file",
",",
"decoder",
"=",
"decoder",
")",
"except",
"ValueError",
"as",
"e",
":",
"if",
"\"{}\"",
".",
"format"... | Load data from json file
:param file: Readable file or path to file
:type file: FileIO | str | unicode
:param decoder: Use custom json decoder
:type decoder: T <= flotils.loadable.DateTimeDecoder
:return: Json data
:rtype: None | int | float | str | list | dict
:... | [
"Load",
"data",
"from",
"json",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L470-L492 |
the01/python-flotils | flotils/loadable.py | Loadable._save_json_file | def _save_json_file(
self, file, val,
pretty=False, compact=True, sort=True, encoder=None
):
"""
Save data to json file
:param file: Writable file or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None |... | python | def _save_json_file(
self, file, val,
pretty=False, compact=True, sort=True, encoder=None
):
"""
Save data to json file
:param file: Writable file or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None |... | [
"def",
"_save_json_file",
"(",
"self",
",",
"file",
",",
"val",
",",
"pretty",
"=",
"False",
",",
"compact",
"=",
"True",
",",
"sort",
"=",
"True",
",",
"encoder",
"=",
"None",
")",
":",
"try",
":",
"save_json_file",
"(",
"file",
",",
"val",
",",
"... | Save data to json file
:param file: Writable file or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | list | dict
:param pretty: Format data to be readable (default: False)
:type pretty: bool
... | [
"Save",
"data",
"to",
"json",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L494-L520 |
the01/python-flotils | flotils/loadable.py | Loadable._load_yaml_file | def _load_yaml_file(self, file):
"""
Load data from yaml file
:param file: Readable object or path to file
:type file: FileIO | str | unicode
:return: Yaml data
:rtype: None | int | float | str | unicode | list | dict
:raises IOError: Failed to load
"""
... | python | def _load_yaml_file(self, file):
"""
Load data from yaml file
:param file: Readable object or path to file
:type file: FileIO | str | unicode
:return: Yaml data
:rtype: None | int | float | str | unicode | list | dict
:raises IOError: Failed to load
"""
... | [
"def",
"_load_yaml_file",
"(",
"self",
",",
"file",
")",
":",
"try",
":",
"res",
"=",
"load_yaml_file",
"(",
"file",
")",
"except",
":",
"self",
".",
"exception",
"(",
"\"Failed to load from {}\"",
".",
"format",
"(",
"file",
")",
")",
"raise",
"IOError",
... | Load data from yaml file
:param file: Readable object or path to file
:type file: FileIO | str | unicode
:return: Yaml data
:rtype: None | int | float | str | unicode | list | dict
:raises IOError: Failed to load | [
"Load",
"data",
"from",
"yaml",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L522-L537 |
the01/python-flotils | flotils/loadable.py | Loadable._save_yaml_file | def _save_yaml_file(self, file, val):
"""
Save data to yaml file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | unicode | list | dict
:raises IOError: Faile... | python | def _save_yaml_file(self, file, val):
"""
Save data to yaml file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | unicode | list | dict
:raises IOError: Faile... | [
"def",
"_save_yaml_file",
"(",
"self",
",",
"file",
",",
"val",
")",
":",
"try",
":",
"save_yaml_file",
"(",
"file",
",",
"val",
")",
"except",
":",
"self",
".",
"exception",
"(",
"\"Failed to save to {}\"",
".",
"format",
"(",
"file",
")",
")",
"raise",... | Save data to yaml file
:param file: Writable object or path to file
:type file: FileIO | str | unicode
:param val: Value or struct to save
:type val: None | int | float | str | unicode | list | dict
:raises IOError: Failed to save | [
"Save",
"data",
"to",
"yaml",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L539-L553 |
the01/python-flotils | flotils/loadable.py | Loadable.load_settings | def load_settings(self, path):
"""
Load settings dict
:param path: Path to settings file
:type path: str | unicode
:return: Loaded settings
:rtype: dict
:raises IOError: If file not found or error accessing file
:raises TypeError: Settings file does not c... | python | def load_settings(self, path):
"""
Load settings dict
:param path: Path to settings file
:type path: str | unicode
:return: Loaded settings
:rtype: dict
:raises IOError: If file not found or error accessing file
:raises TypeError: Settings file does not c... | [
"def",
"load_settings",
"(",
"self",
",",
"path",
")",
":",
"res",
"=",
"self",
".",
"load_file",
"(",
"path",
")",
"if",
"not",
"isinstance",
"(",
"res",
",",
"dict",
")",
":",
"raise",
"TypeError",
"(",
"\"Expected settings to be dict\"",
")",
"return",
... | Load settings dict
:param path: Path to settings file
:type path: str | unicode
:return: Loaded settings
:rtype: dict
:raises IOError: If file not found or error accessing file
:raises TypeError: Settings file does not contain dict | [
"Load",
"settings",
"dict"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L555-L569 |
the01/python-flotils | flotils/loadable.py | Loadable.save_settings | def save_settings(self, path, settings, readable=False):
"""
Save settings to file
:param path: File path to save
:type path: str | unicode
:param settings: Settings to save
:type settings: dict
:param readable: Format file to be human readable (default: False)
... | python | def save_settings(self, path, settings, readable=False):
"""
Save settings to file
:param path: File path to save
:type path: str | unicode
:param settings: Settings to save
:type settings: dict
:param readable: Format file to be human readable (default: False)
... | [
"def",
"save_settings",
"(",
"self",
",",
"path",
",",
"settings",
",",
"readable",
"=",
"False",
")",
":",
"if",
"not",
"isinstance",
"(",
"settings",
",",
"dict",
")",
":",
"raise",
"TypeError",
"(",
"\"Expected settings to be dict\"",
")",
"return",
"self... | Save settings to file
:param path: File path to save
:type path: str | unicode
:param settings: Settings to save
:type settings: dict
:param readable: Format file to be human readable (default: False)
:type readable: bool
:rtype: None
:raises IOError: If ... | [
"Save",
"settings",
"to",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L571-L587 |
the01/python-flotils | flotils/loadable.py | Loadable.load_file | def load_file(self, path):
"""
Load file
:param path: Path to file
:type path: str | unicode
:return: Loaded settings
:rtype: None | str | unicode | int | list | dict
:raises IOError: If file not found or error accessing file
"""
res = None
... | python | def load_file(self, path):
"""
Load file
:param path: Path to file
:type path: str | unicode
:return: Loaded settings
:rtype: None | str | unicode | int | list | dict
:raises IOError: If file not found or error accessing file
"""
res = None
... | [
"def",
"load_file",
"(",
"self",
",",
"path",
")",
":",
"res",
"=",
"None",
"if",
"not",
"path",
":",
"IOError",
"(",
"\"No path specified to save\"",
")",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"path",
")",
":",
"raise",
"IOError",
"(",
... | Load file
:param path: Path to file
:type path: str | unicode
:return: Loaded settings
:rtype: None | str | unicode | int | list | dict
:raises IOError: If file not found or error accessing file | [
"Load",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L589-L618 |
the01/python-flotils | flotils/loadable.py | Loadable.save_file | def save_file(self, path, data, readable=False):
"""
Save to file
:param path: File path to save
:type path: str | unicode
:param data: To save
:type data: None | str | unicode | int | list | dict
:param readable: Format file to be human readable (default: False)... | python | def save_file(self, path, data, readable=False):
"""
Save to file
:param path: File path to save
:type path: str | unicode
:param data: To save
:type data: None | str | unicode | int | list | dict
:param readable: Format file to be human readable (default: False)... | [
"def",
"save_file",
"(",
"self",
",",
"path",
",",
"data",
",",
"readable",
"=",
"False",
")",
":",
"if",
"not",
"path",
":",
"IOError",
"(",
"\"No path specified to save\"",
")",
"try",
":",
"with",
"io",
".",
"open",
"(",
"path",
",",
"\"w\"",
",",
... | Save to file
:param path: File path to save
:type path: str | unicode
:param data: To save
:type data: None | str | unicode | int | list | dict
:param readable: Format file to be human readable (default: False)
:type readable: bool
:rtype: None
:raises IO... | [
"Save",
"to",
"file"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/loadable.py#L620-L652 |
the01/python-flotils | flotils/logable.py | Logable.name | def name(self):
"""
Get the module name
:return: Module name
:rtype: str | unicode
"""
res = type(self).__name__
if self._id:
res += ".{}".format(self._id)
return res | python | def name(self):
"""
Get the module name
:return: Module name
:rtype: str | unicode
"""
res = type(self).__name__
if self._id:
res += ".{}".format(self._id)
return res | [
"def",
"name",
"(",
"self",
")",
":",
"res",
"=",
"type",
"(",
"self",
")",
".",
"__name__",
"if",
"self",
".",
"_id",
":",
"res",
"+=",
"\".{}\"",
".",
"format",
"(",
"self",
".",
"_id",
")",
"return",
"res"
] | Get the module name
:return: Module name
:rtype: str | unicode | [
"Get",
"the",
"module",
"name"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/logable.py#L67-L77 |
the01/python-flotils | flotils/logable.py | Logable._get_function_name | def _get_function_name(self):
"""
Get function name of calling method
:return: The name of the calling function
(expected to be called in self.error/debug/..)
:rtype: str | unicode
"""
fname = inspect.getframeinfo(inspect.stack()[2][0]).function
if fn... | python | def _get_function_name(self):
"""
Get function name of calling method
:return: The name of the calling function
(expected to be called in self.error/debug/..)
:rtype: str | unicode
"""
fname = inspect.getframeinfo(inspect.stack()[2][0]).function
if fn... | [
"def",
"_get_function_name",
"(",
"self",
")",
":",
"fname",
"=",
"inspect",
".",
"getframeinfo",
"(",
"inspect",
".",
"stack",
"(",
")",
"[",
"2",
"]",
"[",
"0",
"]",
")",
".",
"function",
"if",
"fname",
"==",
"\"<module>\"",
":",
"return",
"\"\"",
... | Get function name of calling method
:return: The name of the calling function
(expected to be called in self.error/debug/..)
:rtype: str | unicode | [
"Get",
"function",
"name",
"of",
"calling",
"method"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/logable.py#L79-L91 |
the01/python-flotils | flotils/runable.py | StartStopable.start | def start(self, blocking=False):
"""
Start the interface
:param blocking: Should the call block until stop() is called
(default: False)
:type blocking: bool
:rtype: None
"""
super(StartStopable, self).start()
self._is_running = True
# ... | python | def start(self, blocking=False):
"""
Start the interface
:param blocking: Should the call block until stop() is called
(default: False)
:type blocking: bool
:rtype: None
"""
super(StartStopable, self).start()
self._is_running = True
# ... | [
"def",
"start",
"(",
"self",
",",
"blocking",
"=",
"False",
")",
":",
"super",
"(",
"StartStopable",
",",
"self",
")",
".",
"start",
"(",
")",
"self",
".",
"_is_running",
"=",
"True",
"# blocking",
"try",
":",
"while",
"blocking",
"and",
"self",
".",
... | Start the interface
:param blocking: Should the call block until stop() is called
(default: False)
:type blocking: bool
:rtype: None | [
"Start",
"the",
"interface"
] | train | https://github.com/the01/python-flotils/blob/5954712776bb590107e5b2f4362d010bf74f77a1/flotils/runable.py#L118-L135 |
mandiant/ioc_writer | examples/openioc_to_yara/openioc_to_yara.py | YaraIOCManager.get_embedded_yara | def get_embedded_yara(self, iocid):
"""
Extract YARA signatures embedded in Yara/Yara indicatorItem nodes.
This is done regardless of logic structure in the OpenIOC.
"""
ioc_obj = self.iocs[iocid]
ids_to_process = set([])
signatures = ''
for elem in ioc_ob... | python | def get_embedded_yara(self, iocid):
"""
Extract YARA signatures embedded in Yara/Yara indicatorItem nodes.
This is done regardless of logic structure in the OpenIOC.
"""
ioc_obj = self.iocs[iocid]
ids_to_process = set([])
signatures = ''
for elem in ioc_ob... | [
"def",
"get_embedded_yara",
"(",
"self",
",",
"iocid",
")",
":",
"ioc_obj",
"=",
"self",
".",
"iocs",
"[",
"iocid",
"]",
"ids_to_process",
"=",
"set",
"(",
"[",
"]",
")",
"signatures",
"=",
"''",
"for",
"elem",
"in",
"ioc_obj",
".",
"top_level_indicator"... | Extract YARA signatures embedded in Yara/Yara indicatorItem nodes.
This is done regardless of logic structure in the OpenIOC. | [
"Extract",
"YARA",
"signatures",
"embedded",
"in",
"Yara",
"/",
"Yara",
"indicatorItem",
"nodes",
".",
"This",
"is",
"done",
"regardless",
"of",
"logic",
"structure",
"in",
"the",
"OpenIOC",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/examples/openioc_to_yara/openioc_to_yara.py#L122-L135 |
mandiant/ioc_writer | examples/openioc_to_yara/openioc_to_yara.py | YaraIOCManager.get_yara_condition_string | def get_yara_condition_string(self, indicator_node, parameters_node, ids_to_process, condition_string='',
joining_value='or'):
"""
get_yara_condition_string
input
indicator_node: this is the node we walk down
parameters_node: this contai... | python | def get_yara_condition_string(self, indicator_node, parameters_node, ids_to_process, condition_string='',
joining_value='or'):
"""
get_yara_condition_string
input
indicator_node: this is the node we walk down
parameters_node: this contai... | [
"def",
"get_yara_condition_string",
"(",
"self",
",",
"indicator_node",
",",
"parameters_node",
",",
"ids_to_process",
",",
"condition_string",
"=",
"''",
",",
"joining_value",
"=",
"'or'",
")",
":",
"indicator_node_id",
"=",
"str",
"(",
"indicator_node",
".",
"ge... | get_yara_condition_string
input
indicator_node: this is the node we walk down
parameters_node: this contains all the parameters in the ioc, so we
can look up parameters nodes as we walk them.
ids_to_process: set of ids to upgrade
condition_string:... | [
"get_yara_condition_string"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/examples/openioc_to_yara/openioc_to_yara.py#L174-L349 |
mandiant/ioc_writer | examples/openioc_to_yara/openioc_to_yara.py | YaraIOCManager.write_yara | def write_yara(self, output_file):
"""
Write out yara signatures to a file.
"""
fout = open(output_file, 'wb')
fout.write('\n')
for iocid in self.yara_signatures:
signature = self.yara_signatures[iocid]
fout.write(signature)
fout.write... | python | def write_yara(self, output_file):
"""
Write out yara signatures to a file.
"""
fout = open(output_file, 'wb')
fout.write('\n')
for iocid in self.yara_signatures:
signature = self.yara_signatures[iocid]
fout.write(signature)
fout.write... | [
"def",
"write_yara",
"(",
"self",
",",
"output_file",
")",
":",
"fout",
"=",
"open",
"(",
"output_file",
",",
"'wb'",
")",
"fout",
".",
"write",
"(",
"'\\n'",
")",
"for",
"iocid",
"in",
"self",
".",
"yara_signatures",
":",
"signature",
"=",
"self",
"."... | Write out yara signatures to a file. | [
"Write",
"out",
"yara",
"signatures",
"to",
"a",
"file",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/examples/openioc_to_yara/openioc_to_yara.py#L430-L443 |
mandiant/ioc_writer | ioc_writer/utils/__init__.py | safe_makedirs | def safe_makedirs(fdir):
"""
Make an arbitrary directory. This is safe to call for Python 2 users.
:param fdir: Directory path to make.
:return:
"""
if os.path.isdir(fdir):
pass
# print 'dir already exists: %s' % str(dir)
else:
try:
os.makedirs(fdir)
... | python | def safe_makedirs(fdir):
"""
Make an arbitrary directory. This is safe to call for Python 2 users.
:param fdir: Directory path to make.
:return:
"""
if os.path.isdir(fdir):
pass
# print 'dir already exists: %s' % str(dir)
else:
try:
os.makedirs(fdir)
... | [
"def",
"safe_makedirs",
"(",
"fdir",
")",
":",
"if",
"os",
".",
"path",
".",
"isdir",
"(",
"fdir",
")",
":",
"pass",
"# print 'dir already exists: %s' % str(dir)",
"else",
":",
"try",
":",
"os",
".",
"makedirs",
"(",
"fdir",
")",
"except",
"WindowsError",
... | Make an arbitrary directory. This is safe to call for Python 2 users.
:param fdir: Directory path to make.
:return: | [
"Make",
"an",
"arbitrary",
"directory",
".",
"This",
"is",
"safe",
"to",
"call",
"for",
"Python",
"2",
"users",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/utils/__init__.py#L23-L41 |
mandiant/ioc_writer | ioc_writer/managers/downgrade_11.py | DowngradeManager.convert_to_10 | def convert_to_10(self):
"""
converts the iocs in self.iocs from openioc 1.1 to openioc 1.0 format.
the converted iocs are stored in the dictionary self.iocs_10
:return: A list of iocid values which had errors downgrading.
"""
if len(self) < 1:
log.error('no i... | python | def convert_to_10(self):
"""
converts the iocs in self.iocs from openioc 1.1 to openioc 1.0 format.
the converted iocs are stored in the dictionary self.iocs_10
:return: A list of iocid values which had errors downgrading.
"""
if len(self) < 1:
log.error('no i... | [
"def",
"convert_to_10",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
")",
"<",
"1",
":",
"log",
".",
"error",
"(",
"'no iocs available to modify'",
")",
"return",
"False",
"log",
".",
"info",
"(",
"'Converting IOCs from 1.1 to 1.0.'",
")",
"errors",
"=",... | converts the iocs in self.iocs from openioc 1.1 to openioc 1.0 format.
the converted iocs are stored in the dictionary self.iocs_10
:return: A list of iocid values which had errors downgrading. | [
"converts",
"the",
"iocs",
"in",
"self",
".",
"iocs",
"from",
"openioc",
"1",
".",
"1",
"to",
"openioc",
"1",
".",
"0",
"format",
".",
"the",
"converted",
"iocs",
"are",
"stored",
"in",
"the",
"dictionary",
"self",
".",
"iocs_10",
":",
"return",
":",
... | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/managers/downgrade_11.py#L89-L226 |
mandiant/ioc_writer | ioc_writer/managers/downgrade_11.py | DowngradeManager.convert_branch | def convert_branch(self, old_node, new_node, ids_to_skip, comment_dict=None):
"""
Recursively walk a indicator logic tree, starting from a Indicator node.
Converts OpenIOC 1.1 Indicator/IndicatorItems to Openioc 1.0 and preserves order.
:param old_node: An Indicator node, which we walk... | python | def convert_branch(self, old_node, new_node, ids_to_skip, comment_dict=None):
"""
Recursively walk a indicator logic tree, starting from a Indicator node.
Converts OpenIOC 1.1 Indicator/IndicatorItems to Openioc 1.0 and preserves order.
:param old_node: An Indicator node, which we walk... | [
"def",
"convert_branch",
"(",
"self",
",",
"old_node",
",",
"new_node",
",",
"ids_to_skip",
",",
"comment_dict",
"=",
"None",
")",
":",
"expected_tag",
"=",
"'Indicator'",
"if",
"old_node",
".",
"tag",
"!=",
"expected_tag",
":",
"raise",
"DowngradeError",
"(",... | Recursively walk a indicator logic tree, starting from a Indicator node.
Converts OpenIOC 1.1 Indicator/IndicatorItems to Openioc 1.0 and preserves order.
:param old_node: An Indicator node, which we walk down to convert
:param new_node: An Indicator node, which we add new IndicatorItem and In... | [
"Recursively",
"walk",
"a",
"indicator",
"logic",
"tree",
"starting",
"from",
"a",
"Indicator",
"node",
".",
"Converts",
"OpenIOC",
"1",
".",
"1",
"Indicator",
"/",
"IndicatorItems",
"to",
"Openioc",
"1",
".",
"0",
"and",
"preserves",
"order",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/managers/downgrade_11.py#L228-L291 |
mandiant/ioc_writer | ioc_writer/managers/downgrade_11.py | DowngradeManager.write_iocs | def write_iocs(self, directory=None, source=None):
"""
Serializes IOCs to a directory.
:param directory: Directory to write IOCs to. If not provided, the current working directory is used.
:param source: Dictionary contianing iocid -> IOC mapping. Defaults to self.iocs_10. This is not... | python | def write_iocs(self, directory=None, source=None):
"""
Serializes IOCs to a directory.
:param directory: Directory to write IOCs to. If not provided, the current working directory is used.
:param source: Dictionary contianing iocid -> IOC mapping. Defaults to self.iocs_10. This is not... | [
"def",
"write_iocs",
"(",
"self",
",",
"directory",
"=",
"None",
",",
"source",
"=",
"None",
")",
":",
"\"\"\"\n\n\n if directory is None, write the iocs to the current working directory\n source: allows specifying a different dictionry of elmentTree ioc objects\n \"... | Serializes IOCs to a directory.
:param directory: Directory to write IOCs to. If not provided, the current working directory is used.
:param source: Dictionary contianing iocid -> IOC mapping. Defaults to self.iocs_10. This is not normally modifed by a user for this class.
:return: | [
"Serializes",
"IOCs",
"to",
"a",
"directory",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/managers/downgrade_11.py#L293-L330 |
mandiant/ioc_writer | ioc_writer/managers/downgrade_11.py | DowngradeManager.write_pruned_iocs | def write_pruned_iocs(self, directory=None, pruned_source=None):
"""
Writes IOCs to a directory that have been pruned of some or all IOCs.
:param directory: Directory to write IOCs to. If not provided, the current working directory is used.
:param pruned_source: Iterable containing a s... | python | def write_pruned_iocs(self, directory=None, pruned_source=None):
"""
Writes IOCs to a directory that have been pruned of some or all IOCs.
:param directory: Directory to write IOCs to. If not provided, the current working directory is used.
:param pruned_source: Iterable containing a s... | [
"def",
"write_pruned_iocs",
"(",
"self",
",",
"directory",
"=",
"None",
",",
"pruned_source",
"=",
"None",
")",
":",
"\"\"\"\n write_pruned_iocs to a directory\n\n if directory is None, write the iocs to the current working directory\n \"\"\"",
"if",
"pruned_sour... | Writes IOCs to a directory that have been pruned of some or all IOCs.
:param directory: Directory to write IOCs to. If not provided, the current working directory is used.
:param pruned_source: Iterable containing a set of iocids. Defaults to self.iocs_10.
:return: | [
"Writes",
"IOCs",
"to",
"a",
"directory",
"that",
"have",
"been",
"pruned",
"of",
"some",
"or",
"all",
"IOCs",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/managers/downgrade_11.py#L332-L361 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_dnsentryitem_recordname | def make_dnsentryitem_recordname(dns_name, condition='contains', negate=False, preserve_case=False):
"""
Create a node for DnsEntryItem/RecordName
:return: A IndicatorItem represented as an Element node
"""
document = 'DnsEntryItem'
search = 'DnsEntryItem/RecordName'
content_type = 'str... | python | def make_dnsentryitem_recordname(dns_name, condition='contains', negate=False, preserve_case=False):
"""
Create a node for DnsEntryItem/RecordName
:return: A IndicatorItem represented as an Element node
"""
document = 'DnsEntryItem'
search = 'DnsEntryItem/RecordName'
content_type = 'str... | [
"def",
"make_dnsentryitem_recordname",
"(",
"dns_name",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'DnsEntryItem'",
"search",
"=",
"'DnsEntryItem/RecordName'",
"content_type",
"="... | Create a node for DnsEntryItem/RecordName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"DnsEntryItem",
"/",
"RecordName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L29-L41 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_driveritem_deviceitem_devicename | def make_driveritem_deviceitem_devicename(device_name, condition='is', negate=False, preserve_case=False):
"""
Create a node for DriverItem/DeviceItem/DeviceName
:return: A IndicatorItem represented as an Element node
"""
document = 'DriverItem'
search = 'DriverItem/DeviceItem/DeviceName'
... | python | def make_driveritem_deviceitem_devicename(device_name, condition='is', negate=False, preserve_case=False):
"""
Create a node for DriverItem/DeviceItem/DeviceName
:return: A IndicatorItem represented as an Element node
"""
document = 'DriverItem'
search = 'DriverItem/DeviceItem/DeviceName'
... | [
"def",
"make_driveritem_deviceitem_devicename",
"(",
"device_name",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'DriverItem'",
"search",
"=",
"'DriverItem/DeviceItem/DeviceName'",
"content... | Create a node for DriverItem/DeviceItem/DeviceName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"DriverItem",
"/",
"DeviceItem",
"/",
"DeviceName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L45-L57 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_driveritem_drivername | def make_driveritem_drivername(driver_name, condition='contains', negate=False, preserve_case=False):
"""
Create a node for DriverItem/DriverName
:return: A IndicatorItem represented as an Element node
"""
document = 'DriverItem'
search = 'DriverItem/DriverName'
content_type = 'string'
... | python | def make_driveritem_drivername(driver_name, condition='contains', negate=False, preserve_case=False):
"""
Create a node for DriverItem/DriverName
:return: A IndicatorItem represented as an Element node
"""
document = 'DriverItem'
search = 'DriverItem/DriverName'
content_type = 'string'
... | [
"def",
"make_driveritem_drivername",
"(",
"driver_name",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'DriverItem'",
"search",
"=",
"'DriverItem/DriverName'",
"content_type",
"=",
... | Create a node for DriverItem/DriverName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"DriverItem",
"/",
"DriverName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L61-L73 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_eventlogitem_eid | def make_eventlogitem_eid(eid, condition='is', negate=False):
"""
Create a node for EventLogItem/EID
:return: A IndicatorItem represented as an Element node
"""
document = 'EventLogItem'
search = 'EventLogItem/EID'
content_type = 'int'
content = eid
ii_node = ioc_api.make_indica... | python | def make_eventlogitem_eid(eid, condition='is', negate=False):
"""
Create a node for EventLogItem/EID
:return: A IndicatorItem represented as an Element node
"""
document = 'EventLogItem'
search = 'EventLogItem/EID'
content_type = 'int'
content = eid
ii_node = ioc_api.make_indica... | [
"def",
"make_eventlogitem_eid",
"(",
"eid",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'EventLogItem'",
"search",
"=",
"'EventLogItem/EID'",
"content_type",
"=",
"'int'",
"content",
"=",
"eid",
"ii_node",
"=",
"ioc_... | Create a node for EventLogItem/EID
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"EventLogItem",
"/",
"EID",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L77-L89 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_eventlogitem_log | def make_eventlogitem_log(log, condition='is', negate=False, preserve_case=False):
"""
Create a node for EventLogItem/log
:return: A IndicatorItem represented as an Element node
"""
document = 'EventLogItem'
search = 'EventLogItem/log'
content_type = 'string'
content = log
ii_no... | python | def make_eventlogitem_log(log, condition='is', negate=False, preserve_case=False):
"""
Create a node for EventLogItem/log
:return: A IndicatorItem represented as an Element node
"""
document = 'EventLogItem'
search = 'EventLogItem/log'
content_type = 'string'
content = log
ii_no... | [
"def",
"make_eventlogitem_log",
"(",
"log",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'EventLogItem'",
"search",
"=",
"'EventLogItem/log'",
"content_type",
"=",
"'string'",
"conten... | Create a node for EventLogItem/log
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"EventLogItem",
"/",
"log",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L93-L105 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_eventlogitem_message | def make_eventlogitem_message(message, condition='contains', negate=False, preserve_case=False):
"""
Create a node for EventLogItem/message
:return: A IndicatorItem represented as an Element node
"""
document = 'EventLogItem'
search = 'EventLogItem/message'
content_type = 'string'
c... | python | def make_eventlogitem_message(message, condition='contains', negate=False, preserve_case=False):
"""
Create a node for EventLogItem/message
:return: A IndicatorItem represented as an Element node
"""
document = 'EventLogItem'
search = 'EventLogItem/message'
content_type = 'string'
c... | [
"def",
"make_eventlogitem_message",
"(",
"message",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'EventLogItem'",
"search",
"=",
"'EventLogItem/message'",
"content_type",
"=",
"'s... | Create a node for EventLogItem/message
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"EventLogItem",
"/",
"message",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L109-L121 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_fileattributes | def make_fileitem_fileattributes(attributes, condition='contains', negate=False, preserve_case=False):
"""
Create a node for FileItem/FileAttributes
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FileAttributes'
content_type = 'strin... | python | def make_fileitem_fileattributes(attributes, condition='contains', negate=False, preserve_case=False):
"""
Create a node for FileItem/FileAttributes
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FileAttributes'
content_type = 'strin... | [
"def",
"make_fileitem_fileattributes",
"(",
"attributes",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/FileAttributes'",
"content_type",
"=",
... | Create a node for FileItem/FileAttributes
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"FileAttributes",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L125-L137 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_fileextension | def make_fileitem_fileextension(extension, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/FileExtension
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FileExtension'
content_type = 'string'
con... | python | def make_fileitem_fileextension(extension, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/FileExtension
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FileExtension'
content_type = 'string'
con... | [
"def",
"make_fileitem_fileextension",
"(",
"extension",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/FileExtension'",
"content_type",
"=",
"'strin... | Create a node for FileItem/FileExtension
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"FileExtension",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L141-L153 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_filename | def make_fileitem_filename(filename, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/FileName
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FileName'
content_type = 'string'
content = filename
... | python | def make_fileitem_filename(filename, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/FileName
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FileName'
content_type = 'string'
content = filename
... | [
"def",
"make_fileitem_filename",
"(",
"filename",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/FileName'",
"content_type",
"=",
"'string'",
"con... | Create a node for FileItem/FileName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"FileName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L157-L169 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_filepath | def make_fileitem_filepath(filepath, condition='contains', negate=False, preserve_case=False):
"""
Create a node for FileItem/FilePath
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FilePath'
content_type = 'string'
content = fil... | python | def make_fileitem_filepath(filepath, condition='contains', negate=False, preserve_case=False):
"""
Create a node for FileItem/FilePath
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FilePath'
content_type = 'string'
content = fil... | [
"def",
"make_fileitem_filepath",
"(",
"filepath",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/FilePath'",
"content_type",
"=",
"'string'",
... | Create a node for FileItem/FilePath
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"FilePath",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L173-L185 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_fullpath | def make_fileitem_fullpath(fullpath, condition='contains', negate=False, preserve_case=False):
"""
Create a node for FileItem/FullPath
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FullPath'
content_type = 'string'
content = ful... | python | def make_fileitem_fullpath(fullpath, condition='contains', negate=False, preserve_case=False):
"""
Create a node for FileItem/FullPath
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/FullPath'
content_type = 'string'
content = ful... | [
"def",
"make_fileitem_fullpath",
"(",
"fullpath",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/FullPath'",
"content_type",
"=",
"'string'",
... | Create a node for FileItem/FullPath
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"FullPath",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L189-L201 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_md5sum | def make_fileitem_md5sum(md5, condition='is', negate=False):
"""
Create a node for FileItem/Md5sum
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/Md5sum'
content_type = 'md5'
content = md5
ii_node = ioc_api.make_indicatoritem... | python | def make_fileitem_md5sum(md5, condition='is', negate=False):
"""
Create a node for FileItem/Md5sum
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/Md5sum'
content_type = 'md5'
content = md5
ii_node = ioc_api.make_indicatoritem... | [
"def",
"make_fileitem_md5sum",
"(",
"md5",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/Md5sum'",
"content_type",
"=",
"'md5'",
"content",
"=",
"md5",
"ii_node",
"=",
"ioc_api",
... | Create a node for FileItem/Md5sum
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"Md5sum",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L205-L217 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_detectedanomalies_string | def make_fileitem_peinfo_detectedanomalies_string(anomaly, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/DetectedAnomalies/string
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/DetectedA... | python | def make_fileitem_peinfo_detectedanomalies_string(anomaly, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/DetectedAnomalies/string
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/DetectedA... | [
"def",
"make_fileitem_peinfo_detectedanomalies_string",
"(",
"anomaly",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/DetectedAnomalies/string'",
... | Create a node for FileItem/PEInfo/DetectedAnomalies/string
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"DetectedAnomalies",
"/",
"string",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L221-L233 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_detectedentrypointsignature_name | def make_fileitem_peinfo_detectedentrypointsignature_name(entrypoint_name, condition='is', negate=False,
preserve_case=False):
"""
Create a node for FileItem/PEInfo/DetectedEntryPointSignature/Name
:return: A IndicatorItem represented as an Elem... | python | def make_fileitem_peinfo_detectedentrypointsignature_name(entrypoint_name, condition='is', negate=False,
preserve_case=False):
"""
Create a node for FileItem/PEInfo/DetectedEntryPointSignature/Name
:return: A IndicatorItem represented as an Elem... | [
"def",
"make_fileitem_peinfo_detectedentrypointsignature_name",
"(",
"entrypoint_name",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/DetectedEntr... | Create a node for FileItem/PEInfo/DetectedEntryPointSignature/Name
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"DetectedEntryPointSignature",
"/",
"Name",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L237-L250 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_digitalsignature_signatureexists | def make_fileitem_peinfo_digitalsignature_signatureexists(sig_exists, condition='is', negate=False):
"""
Create a node for FileItem/PEInfo/DigitalSignature/SignatureExists
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/DigitalSign... | python | def make_fileitem_peinfo_digitalsignature_signatureexists(sig_exists, condition='is', negate=False):
"""
Create a node for FileItem/PEInfo/DigitalSignature/SignatureExists
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/DigitalSign... | [
"def",
"make_fileitem_peinfo_digitalsignature_signatureexists",
"(",
"sig_exists",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/DigitalSignature/SignatureExists'",
"content_type",
"=",
... | Create a node for FileItem/PEInfo/DigitalSignature/SignatureExists
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"DigitalSignature",
"/",
"SignatureExists",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L254-L266 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_digitalsignature_signatureverified | def make_fileitem_peinfo_digitalsignature_signatureverified(sig_verified, condition='is', negate=False):
"""
Create a node for FileItem/PEInfo/DigitalSignature/SignatureVerified
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/Digit... | python | def make_fileitem_peinfo_digitalsignature_signatureverified(sig_verified, condition='is', negate=False):
"""
Create a node for FileItem/PEInfo/DigitalSignature/SignatureVerified
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/Digit... | [
"def",
"make_fileitem_peinfo_digitalsignature_signatureverified",
"(",
"sig_verified",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/DigitalSignature/SignatureVerified'",
"content_type",
... | Create a node for FileItem/PEInfo/DigitalSignature/SignatureVerified
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"DigitalSignature",
"/",
"SignatureVerified",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L270-L282 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_exports_dllname | def make_fileitem_peinfo_exports_dllname(dll_name, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/Exports/DllName
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/Exports/DllName'
conte... | python | def make_fileitem_peinfo_exports_dllname(dll_name, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/Exports/DllName
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/Exports/DllName'
conte... | [
"def",
"make_fileitem_peinfo_exports_dllname",
"(",
"dll_name",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/Exports/DllName'",
"content_type",... | Create a node for FileItem/PEInfo/Exports/DllName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"Exports",
"/",
"DllName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L286-L298 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_exports_numberoffunctions | def make_fileitem_peinfo_exports_numberoffunctions(function_count, condition='is', negate=False):
"""
Create a node for FileItem/PEInfo/Exports/NumberOfFunctions
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/Exports/NumberOfFunct... | python | def make_fileitem_peinfo_exports_numberoffunctions(function_count, condition='is', negate=False):
"""
Create a node for FileItem/PEInfo/Exports/NumberOfFunctions
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/Exports/NumberOfFunct... | [
"def",
"make_fileitem_peinfo_exports_numberoffunctions",
"(",
"function_count",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/Exports/NumberOfFunctions'",
"content_type",
"=",
"'int'",... | Create a node for FileItem/PEInfo/Exports/NumberOfFunctions
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"Exports",
"/",
"NumberOfFunctions",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L319-L331 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_importedmodules_module_importedfunctions_string | def make_fileitem_peinfo_importedmodules_module_importedfunctions_string(imported_function, condition='is',
negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/ImportedModules/Module/ImportedFunctions/string
... | python | def make_fileitem_peinfo_importedmodules_module_importedfunctions_string(imported_function, condition='is',
negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/ImportedModules/Module/ImportedFunctions/string
... | [
"def",
"make_fileitem_peinfo_importedmodules_module_importedfunctions_string",
"(",
"imported_function",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PE... | Create a node for FileItem/PEInfo/ImportedModules/Module/ImportedFunctions/string
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"ImportedModules",
"/",
"Module",
"/",
"ImportedFunctions",
"/",
"string",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L335-L348 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_importedmodules_module_name | def make_fileitem_peinfo_importedmodules_module_name(imported_module, condition='is', negate=False,
preserve_case=False):
"""
Create a node for FileItem/PEInfo/ImportedModules/Module/Name
:return: A IndicatorItem represented as an Element node
""... | python | def make_fileitem_peinfo_importedmodules_module_name(imported_module, condition='is', negate=False,
preserve_case=False):
"""
Create a node for FileItem/PEInfo/ImportedModules/Module/Name
:return: A IndicatorItem represented as an Element node
""... | [
"def",
"make_fileitem_peinfo_importedmodules_module_name",
"(",
"imported_module",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/ImportedModules/M... | Create a node for FileItem/PEInfo/ImportedModules/Module/Name
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"ImportedModules",
"/",
"Module",
"/",
"Name",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L352-L365 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_petimestamp | def make_fileitem_peinfo_petimestamp(compile_time, condition='is', negate=False):
"""
Create a node for FileItem/PEInfo/PETimeStamp
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/PETimeStamp'
content_type = 'date'
content ... | python | def make_fileitem_peinfo_petimestamp(compile_time, condition='is', negate=False):
"""
Create a node for FileItem/PEInfo/PETimeStamp
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/PETimeStamp'
content_type = 'date'
content ... | [
"def",
"make_fileitem_peinfo_petimestamp",
"(",
"compile_time",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/PETimeStamp'",
"content_type",
"=",
"'date'",
"content",
"=",
"compi... | Create a node for FileItem/PEInfo/PETimeStamp
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"PETimeStamp",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L369-L381 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_resourceinfolist_resourceinfoitem_name | def make_fileitem_peinfo_resourceinfolist_resourceinfoitem_name(resource_name, condition='is', negate=False,
preserve_case=False):
"""
Create a node for FileItem/PEInfo/ResourceInfoList/ResourceInfoItem/Name
:return: A IndicatorItem repres... | python | def make_fileitem_peinfo_resourceinfolist_resourceinfoitem_name(resource_name, condition='is', negate=False,
preserve_case=False):
"""
Create a node for FileItem/PEInfo/ResourceInfoList/ResourceInfoItem/Name
:return: A IndicatorItem repres... | [
"def",
"make_fileitem_peinfo_resourceinfolist_resourceinfoitem_name",
"(",
"resource_name",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/Resource... | Create a node for FileItem/PEInfo/ResourceInfoList/ResourceInfoItem/Name
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"ResourceInfoList",
"/",
"ResourceInfoItem",
"/",
"Name",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L385-L398 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_type | def make_fileitem_peinfo_type(petype, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/Type
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/Type'
content_type = 'string'
content = pe... | python | def make_fileitem_peinfo_type(petype, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/Type
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/PEInfo/Type'
content_type = 'string'
content = pe... | [
"def",
"make_fileitem_peinfo_type",
"(",
"petype",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/Type'",
"content_type",
"=",
"'string'",
... | Create a node for FileItem/PEInfo/Type
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"Type",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L418-L430 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_sizeinbytes | def make_fileitem_sizeinbytes(filesize, condition='is', negate=False):
"""
Create a node for FileItem/SizeInBytes
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/SizeInBytes'
content_type = 'int'
content = filesize
ii_node = i... | python | def make_fileitem_sizeinbytes(filesize, condition='is', negate=False):
"""
Create a node for FileItem/SizeInBytes
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/SizeInBytes'
content_type = 'int'
content = filesize
ii_node = i... | [
"def",
"make_fileitem_sizeinbytes",
"(",
"filesize",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/SizeInBytes'",
"content_type",
"=",
"'int'",
"content",
"=",
"filesize",
"ii_node",
... | Create a node for FileItem/SizeInBytes
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"SizeInBytes",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L434-L446 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_streamlist_stream_name | def make_fileitem_streamlist_stream_name(stream_name, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/StreamList/Stream/Name
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/StreamList/Stream/Name'
co... | python | def make_fileitem_streamlist_stream_name(stream_name, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/StreamList/Stream/Name
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/StreamList/Stream/Name'
co... | [
"def",
"make_fileitem_streamlist_stream_name",
"(",
"stream_name",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/StreamList/Stream/Name'",
"content_typ... | Create a node for FileItem/StreamList/Stream/Name
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"StreamList",
"/",
"Stream",
"/",
"Name",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L450-L462 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_stringlist_string | def make_fileitem_stringlist_string(file_string, condition='contains', negate=False, preserve_case=False):
"""
Create a node for FileItem/StringList/string
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/StringList/string'
content_typ... | python | def make_fileitem_stringlist_string(file_string, condition='contains', negate=False, preserve_case=False):
"""
Create a node for FileItem/StringList/string
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/StringList/string'
content_typ... | [
"def",
"make_fileitem_stringlist_string",
"(",
"file_string",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/StringList/string'",
"content_type",
... | Create a node for FileItem/StringList/string
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"StringList",
"/",
"string",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L466-L478 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_username | def make_fileitem_username(file_owner, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/Username
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/Username'
content_type = 'string'
content = file_ow... | python | def make_fileitem_username(file_owner, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/Username
:return: A IndicatorItem represented as an Element node
"""
document = 'FileItem'
search = 'FileItem/Username'
content_type = 'string'
content = file_ow... | [
"def",
"make_fileitem_username",
"(",
"file_owner",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/Username'",
"content_type",
"=",
"'string'",
"c... | Create a node for FileItem/Username
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"Username",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L482-L494 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_hookitem_hookedfunction | def make_hookitem_hookedfunction(hooked_function, condition='is', negate=False, preserve_case=False):
"""
Create a node for HookItem/HookedFunction
:return: A IndicatorItem represented as an Element node
"""
document = 'HookItem'
search = 'HookItem/HookedFunction'
content_type = 'string... | python | def make_hookitem_hookedfunction(hooked_function, condition='is', negate=False, preserve_case=False):
"""
Create a node for HookItem/HookedFunction
:return: A IndicatorItem represented as an Element node
"""
document = 'HookItem'
search = 'HookItem/HookedFunction'
content_type = 'string... | [
"def",
"make_hookitem_hookedfunction",
"(",
"hooked_function",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'HookItem'",
"search",
"=",
"'HookItem/HookedFunction'",
"content_type",
"=",
... | Create a node for HookItem/HookedFunction
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"HookItem",
"/",
"HookedFunction",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L498-L510 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_hookitem_hookingmodule | def make_hookitem_hookingmodule(hooking_module, condition='contains', negate=False, preserve_case=False):
"""
Create a node for HookItem/HookingModule
:return: A IndicatorItem represented as an Element node
"""
document = 'HookItem'
search = 'HookItem/HookingModule'
content_type = 'stri... | python | def make_hookitem_hookingmodule(hooking_module, condition='contains', negate=False, preserve_case=False):
"""
Create a node for HookItem/HookingModule
:return: A IndicatorItem represented as an Element node
"""
document = 'HookItem'
search = 'HookItem/HookingModule'
content_type = 'stri... | [
"def",
"make_hookitem_hookingmodule",
"(",
"hooking_module",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'HookItem'",
"search",
"=",
"'HookItem/HookingModule'",
"content_type",
"="... | Create a node for HookItem/HookingModule
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"HookItem",
"/",
"HookingModule",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L514-L526 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_portitem_remoteport | def make_portitem_remoteport(remote_port, condition='is', negate=False):
"""
Create a node for PortItem/remotePort
:return: A IndicatorItem represented as an Element node
"""
document = 'PortItem'
search = 'PortItem/remotePort'
content_type = 'int'
content = remote_port
ii_node ... | python | def make_portitem_remoteport(remote_port, condition='is', negate=False):
"""
Create a node for PortItem/remotePort
:return: A IndicatorItem represented as an Element node
"""
document = 'PortItem'
search = 'PortItem/remotePort'
content_type = 'int'
content = remote_port
ii_node ... | [
"def",
"make_portitem_remoteport",
"(",
"remote_port",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'PortItem'",
"search",
"=",
"'PortItem/remotePort'",
"content_type",
"=",
"'int'",
"content",
"=",
"remote_port",
"ii_nod... | Create a node for PortItem/remotePort
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"PortItem",
"/",
"remotePort",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L546-L558 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_prefetchitem_accessedfilelist_accessedfile | def make_prefetchitem_accessedfilelist_accessedfile(accessed_file, condition='contains', negate=False,
preserve_case=False):
"""
Create a node for PrefetchItem/AccessedFileList/AccessedFile
:return: A IndicatorItem represented as an Element node
"... | python | def make_prefetchitem_accessedfilelist_accessedfile(accessed_file, condition='contains', negate=False,
preserve_case=False):
"""
Create a node for PrefetchItem/AccessedFileList/AccessedFile
:return: A IndicatorItem represented as an Element node
"... | [
"def",
"make_prefetchitem_accessedfilelist_accessedfile",
"(",
"accessed_file",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'PrefetchItem'",
"search",
"=",
"'PrefetchItem/AccessedFileL... | Create a node for PrefetchItem/AccessedFileList/AccessedFile
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"PrefetchItem",
"/",
"AccessedFileList",
"/",
"AccessedFile",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L562-L575 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_prefetchitem_applicationfilename | def make_prefetchitem_applicationfilename(application_filename, condition='is', negate=False, preserve_case=False):
"""
Create a node for PrefetchItem/ApplicationFileName
:return: A IndicatorItem represented as an Element node
"""
document = 'PrefetchItem'
search = 'PrefetchItem/Application... | python | def make_prefetchitem_applicationfilename(application_filename, condition='is', negate=False, preserve_case=False):
"""
Create a node for PrefetchItem/ApplicationFileName
:return: A IndicatorItem represented as an Element node
"""
document = 'PrefetchItem'
search = 'PrefetchItem/Application... | [
"def",
"make_prefetchitem_applicationfilename",
"(",
"application_filename",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'PrefetchItem'",
"search",
"=",
"'PrefetchItem/ApplicationFileName'",... | Create a node for PrefetchItem/ApplicationFileName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"PrefetchItem",
"/",
"ApplicationFileName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L579-L591 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_prefetchitem_applicationfullpath | def make_prefetchitem_applicationfullpath(application_fullpath, condition='contains', negate=False,
preserve_case=False):
"""
Create a node for PrefetchItem/ApplicationFullPath
:return: A IndicatorItem represented as an Element node
"""
document = 'Pref... | python | def make_prefetchitem_applicationfullpath(application_fullpath, condition='contains', negate=False,
preserve_case=False):
"""
Create a node for PrefetchItem/ApplicationFullPath
:return: A IndicatorItem represented as an Element node
"""
document = 'Pref... | [
"def",
"make_prefetchitem_applicationfullpath",
"(",
"application_fullpath",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'PrefetchItem'",
"search",
"=",
"'PrefetchItem/ApplicationFullP... | Create a node for PrefetchItem/ApplicationFullPath
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"PrefetchItem",
"/",
"ApplicationFullPath",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L595-L608 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_processitem_handlelist_handle_name | def make_processitem_handlelist_handle_name(handle_name, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/HandleList/Handle/Name
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/HandleList/H... | python | def make_processitem_handlelist_handle_name(handle_name, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/HandleList/Handle/Name
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/HandleList/H... | [
"def",
"make_processitem_handlelist_handle_name",
"(",
"handle_name",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ProcessItem'",
"search",
"=",
"'ProcessItem/HandleList/Handle/Name'",... | Create a node for ProcessItem/HandleList/Handle/Name
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ProcessItem",
"/",
"HandleList",
"/",
"Handle",
"/",
"Name",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L612-L624 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_processitem_portlist_portitem_remoteip | def make_processitem_portlist_portitem_remoteip(remote_ip, condition='is', negate=False):
"""
Create a node for ProcessItem/PortList/PortItem/remoteIP
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/PortList/PortItem/remoteIP'
c... | python | def make_processitem_portlist_portitem_remoteip(remote_ip, condition='is', negate=False):
"""
Create a node for ProcessItem/PortList/PortItem/remoteIP
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/PortList/PortItem/remoteIP'
c... | [
"def",
"make_processitem_portlist_portitem_remoteip",
"(",
"remote_ip",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'ProcessItem'",
"search",
"=",
"'ProcessItem/PortList/PortItem/remoteIP'",
"content_type",
"=",
"'IP'",
"conte... | Create a node for ProcessItem/PortList/PortItem/remoteIP
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ProcessItem",
"/",
"PortList",
"/",
"PortItem",
"/",
"remoteIP",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L628-L640 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_processitem_sectionlist_memorysection_name | def make_processitem_sectionlist_memorysection_name(section_name, condition='contains', negate=False,
preserve_case=False):
"""
Create a node for ProcessItem/SectionList/MemorySection/Name
:return: A IndicatorItem represented as an Element node
""... | python | def make_processitem_sectionlist_memorysection_name(section_name, condition='contains', negate=False,
preserve_case=False):
"""
Create a node for ProcessItem/SectionList/MemorySection/Name
:return: A IndicatorItem represented as an Element node
""... | [
"def",
"make_processitem_sectionlist_memorysection_name",
"(",
"section_name",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ProcessItem'",
"search",
"=",
"'ProcessItem/SectionList/Memo... | Create a node for ProcessItem/SectionList/MemorySection/Name
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ProcessItem",
"/",
"SectionList",
"/",
"MemorySection",
"/",
"Name",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L644-L657 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_processitem_sectionlist_memorysection_peinfo_exports_exportedfunctions_string | def make_processitem_sectionlist_memorysection_peinfo_exports_exportedfunctions_string(export_function, condition='is',
negate=False,
preserve_cas... | python | def make_processitem_sectionlist_memorysection_peinfo_exports_exportedfunctions_string(export_function, condition='is',
negate=False,
preserve_cas... | [
"def",
"make_processitem_sectionlist_memorysection_peinfo_exports_exportedfunctions_string",
"(",
"export_function",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ProcessItem'",
"search",
"=",
... | Create a node for ProcessItem/SectionList/MemorySection/PEInfo/Exports/ExportedFunctions/string
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ProcessItem",
"/",
"SectionList",
"/",
"MemorySection",
"/",
"PEInfo",
"/",
"Exports",
"/",
"ExportedFunctions",
"/",
"string",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L661-L675 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_processitem_stringlist_string | def make_processitem_stringlist_string(string, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/StringList/string
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/StringList/string'
cont... | python | def make_processitem_stringlist_string(string, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/StringList/string
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/StringList/string'
cont... | [
"def",
"make_processitem_stringlist_string",
"(",
"string",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ProcessItem'",
"search",
"=",
"'ProcessItem/StringList/string'",
"content_typ... | Create a node for ProcessItem/StringList/string
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ProcessItem",
"/",
"StringList",
"/",
"string",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L679-L691 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_processitem_username | def make_processitem_username(username, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/Username
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/Username'
content_type = 'string'
c... | python | def make_processitem_username(username, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/Username
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/Username'
content_type = 'string'
c... | [
"def",
"make_processitem_username",
"(",
"username",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ProcessItem'",
"search",
"=",
"'ProcessItem/Username'",
"content_type",
"=",
"'s... | Create a node for ProcessItem/Username
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ProcessItem",
"/",
"Username",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L695-L707 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_processitem_arguments | def make_processitem_arguments(arguments, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/arguments
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/arguments'
content_type = 'string'
... | python | def make_processitem_arguments(arguments, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/arguments
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/arguments'
content_type = 'string'
... | [
"def",
"make_processitem_arguments",
"(",
"arguments",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ProcessItem'",
"search",
"=",
"'ProcessItem/arguments'",
"content_type",
"=",
... | Create a node for ProcessItem/arguments
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ProcessItem",
"/",
"arguments",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L711-L723 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_processitem_path | def make_processitem_path(path, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/path
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/path'
content_type = 'string'
content = path
... | python | def make_processitem_path(path, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ProcessItem/path
:return: A IndicatorItem represented as an Element node
"""
document = 'ProcessItem'
search = 'ProcessItem/path'
content_type = 'string'
content = path
... | [
"def",
"make_processitem_path",
"(",
"path",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ProcessItem'",
"search",
"=",
"'ProcessItem/path'",
"content_type",
"=",
"'string'",
"... | Create a node for ProcessItem/path
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ProcessItem",
"/",
"path",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L743-L755 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_registryitem_keypath | def make_registryitem_keypath(keypath, condition='contains', negate=False, preserve_case=False):
"""
Create a node for RegistryItem/KeyPath
:return: A IndicatorItem represented as an Element node
"""
document = 'RegistryItem'
search = 'RegistryItem/KeyPath'
content_type = 'string'
c... | python | def make_registryitem_keypath(keypath, condition='contains', negate=False, preserve_case=False):
"""
Create a node for RegistryItem/KeyPath
:return: A IndicatorItem represented as an Element node
"""
document = 'RegistryItem'
search = 'RegistryItem/KeyPath'
content_type = 'string'
c... | [
"def",
"make_registryitem_keypath",
"(",
"keypath",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'RegistryItem'",
"search",
"=",
"'RegistryItem/KeyPath'",
"content_type",
"=",
"'s... | Create a node for RegistryItem/KeyPath
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"RegistryItem",
"/",
"KeyPath",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L759-L771 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_registryitem_text | def make_registryitem_text(text, condition='contains', negate=False, preserve_case=False):
"""
Create a node for RegistryItem/Text
:return: A IndicatorItem represented as an Element node
"""
document = 'RegistryItem'
search = 'RegistryItem/Text'
content_type = 'string'
content = tex... | python | def make_registryitem_text(text, condition='contains', negate=False, preserve_case=False):
"""
Create a node for RegistryItem/Text
:return: A IndicatorItem represented as an Element node
"""
document = 'RegistryItem'
search = 'RegistryItem/Text'
content_type = 'string'
content = tex... | [
"def",
"make_registryitem_text",
"(",
"text",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'RegistryItem'",
"search",
"=",
"'RegistryItem/Text'",
"content_type",
"=",
"'string'",
... | Create a node for RegistryItem/Text
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"RegistryItem",
"/",
"Text",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L791-L803 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_registryitem_valuename | def make_registryitem_valuename(valuename, condition='is', negate=False, preserve_case=False):
"""
Create a node for RegistryItem/ValueName
:return: A IndicatorItem represented as an Element node
"""
document = 'RegistryItem'
search = 'RegistryItem/ValueName'
content_type = 'string'
... | python | def make_registryitem_valuename(valuename, condition='is', negate=False, preserve_case=False):
"""
Create a node for RegistryItem/ValueName
:return: A IndicatorItem represented as an Element node
"""
document = 'RegistryItem'
search = 'RegistryItem/ValueName'
content_type = 'string'
... | [
"def",
"make_registryitem_valuename",
"(",
"valuename",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'RegistryItem'",
"search",
"=",
"'RegistryItem/ValueName'",
"content_type",
"=",
"'s... | Create a node for RegistryItem/ValueName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"RegistryItem",
"/",
"ValueName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L807-L819 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_serviceitem_description | def make_serviceitem_description(description, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ServiceItem/description
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/description'
content_type = 's... | python | def make_serviceitem_description(description, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ServiceItem/description
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/description'
content_type = 's... | [
"def",
"make_serviceitem_description",
"(",
"description",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ServiceItem'",
"search",
"=",
"'ServiceItem/description'",
"content_type",
"... | Create a node for ServiceItem/description
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ServiceItem",
"/",
"description",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L823-L835 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_serviceitem_descriptivename | def make_serviceitem_descriptivename(descriptive_name, condition='is', negate=False, preserve_case=False):
"""
Create a node for ServiceItem/descriptiveName
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/descriptiveName'
conten... | python | def make_serviceitem_descriptivename(descriptive_name, condition='is', negate=False, preserve_case=False):
"""
Create a node for ServiceItem/descriptiveName
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/descriptiveName'
conten... | [
"def",
"make_serviceitem_descriptivename",
"(",
"descriptive_name",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ServiceItem'",
"search",
"=",
"'ServiceItem/descriptiveName'",
"content_typ... | Create a node for ServiceItem/descriptiveName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ServiceItem",
"/",
"descriptiveName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L839-L851 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_serviceitem_name | def make_serviceitem_name(name, condition='is', negate=False, preserve_case=False):
"""
Create a node for ServiceItem/name
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/name'
content_type = 'string'
content = name
ii_n... | python | def make_serviceitem_name(name, condition='is', negate=False, preserve_case=False):
"""
Create a node for ServiceItem/name
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/name'
content_type = 'string'
content = name
ii_n... | [
"def",
"make_serviceitem_name",
"(",
"name",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ServiceItem'",
"search",
"=",
"'ServiceItem/name'",
"content_type",
"=",
"'string'",
"conten... | Create a node for ServiceItem/name
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ServiceItem",
"/",
"name",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L855-L867 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_serviceitem_pathmd5sum | def make_serviceitem_pathmd5sum(path_md5, condition='is', negate=False):
"""
Create a node for ServiceItem/pathmd5sum
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/pathmd5sum'
content_type = 'md5'
content = path_md5
ii... | python | def make_serviceitem_pathmd5sum(path_md5, condition='is', negate=False):
"""
Create a node for ServiceItem/pathmd5sum
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/pathmd5sum'
content_type = 'md5'
content = path_md5
ii... | [
"def",
"make_serviceitem_pathmd5sum",
"(",
"path_md5",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'ServiceItem'",
"search",
"=",
"'ServiceItem/pathmd5sum'",
"content_type",
"=",
"'md5'",
"content",
"=",
"path_md5",
"ii_... | Create a node for ServiceItem/pathmd5sum
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ServiceItem",
"/",
"pathmd5sum",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L887-L899 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_serviceitem_servicedll | def make_serviceitem_servicedll(servicedll, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ServiceItem/serviceDLL
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/serviceDLL'
content_type = 'strin... | python | def make_serviceitem_servicedll(servicedll, condition='contains', negate=False, preserve_case=False):
"""
Create a node for ServiceItem/serviceDLL
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/serviceDLL'
content_type = 'strin... | [
"def",
"make_serviceitem_servicedll",
"(",
"servicedll",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'ServiceItem'",
"search",
"=",
"'ServiceItem/serviceDLL'",
"content_type",
"=",... | Create a node for ServiceItem/serviceDLL
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ServiceItem",
"/",
"serviceDLL",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L903-L915 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_serviceitem_servicedllsignatureexists | def make_serviceitem_servicedllsignatureexists(dll_sig_exists, condition='is', negate=False):
"""
Create a node for ServiceItem/serviceDLLSignatureExists
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/serviceDLLSignatureExists'
... | python | def make_serviceitem_servicedllsignatureexists(dll_sig_exists, condition='is', negate=False):
"""
Create a node for ServiceItem/serviceDLLSignatureExists
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/serviceDLLSignatureExists'
... | [
"def",
"make_serviceitem_servicedllsignatureexists",
"(",
"dll_sig_exists",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'ServiceItem'",
"search",
"=",
"'ServiceItem/serviceDLLSignatureExists'",
"content_type",
"=",
"'bool'",
"... | Create a node for ServiceItem/serviceDLLSignatureExists
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ServiceItem",
"/",
"serviceDLLSignatureExists",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L919-L931 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_serviceitem_servicedllsignatureverified | def make_serviceitem_servicedllsignatureverified(dll_sig_verified, condition='is', negate=False):
"""
Create a node for ServiceItem/serviceDLLSignatureVerified
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/serviceDLLSignatureVerif... | python | def make_serviceitem_servicedllsignatureverified(dll_sig_verified, condition='is', negate=False):
"""
Create a node for ServiceItem/serviceDLLSignatureVerified
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/serviceDLLSignatureVerif... | [
"def",
"make_serviceitem_servicedllsignatureverified",
"(",
"dll_sig_verified",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'ServiceItem'",
"search",
"=",
"'ServiceItem/serviceDLLSignatureVerified'",
"content_type",
"=",
"'bool'... | Create a node for ServiceItem/serviceDLLSignatureVerified
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ServiceItem",
"/",
"serviceDLLSignatureVerified",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L935-L947 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_serviceitem_servicedllmd5sum | def make_serviceitem_servicedllmd5sum(servicedll_md5, condition='is', negate=False):
"""
Create a node for ServiceItem/serviceDLLmd5sum
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/serviceDLLmd5sum'
content_type = 'md5'
c... | python | def make_serviceitem_servicedllmd5sum(servicedll_md5, condition='is', negate=False):
"""
Create a node for ServiceItem/serviceDLLmd5sum
:return: A IndicatorItem represented as an Element node
"""
document = 'ServiceItem'
search = 'ServiceItem/serviceDLLmd5sum'
content_type = 'md5'
c... | [
"def",
"make_serviceitem_servicedllmd5sum",
"(",
"servicedll_md5",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
")",
":",
"document",
"=",
"'ServiceItem'",
"search",
"=",
"'ServiceItem/serviceDLLmd5sum'",
"content_type",
"=",
"'md5'",
"content",
"=",
... | Create a node for ServiceItem/serviceDLLmd5sum
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"ServiceItem",
"/",
"serviceDLLmd5sum",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L951-L963 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_systeminfoitem_hostname | def make_systeminfoitem_hostname(hostname, condition='contains', negate=False, preserve_case=False):
"""
Create a node for SystemInfoItem/hostname
:return: A IndicatorItem represented as an Element node
"""
document = 'SystemInfoItem'
search = 'SystemInfoItem/hostname'
content_type = 's... | python | def make_systeminfoitem_hostname(hostname, condition='contains', negate=False, preserve_case=False):
"""
Create a node for SystemInfoItem/hostname
:return: A IndicatorItem represented as an Element node
"""
document = 'SystemInfoItem'
search = 'SystemInfoItem/hostname'
content_type = 's... | [
"def",
"make_systeminfoitem_hostname",
"(",
"hostname",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'SystemInfoItem'",
"search",
"=",
"'SystemInfoItem/hostname'",
"content_type",
"... | Create a node for SystemInfoItem/hostname
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"SystemInfoItem",
"/",
"hostname",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L967-L979 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_systemrestoreitem_originalfilename | def make_systemrestoreitem_originalfilename(original_filename, condition='contains', negate=False, preserve_case=False):
"""
Create a node for SystemRestoreItem/OriginalFileName
:return: A IndicatorItem represented as an Element node
"""
document = 'SystemRestoreItem'
search = 'SystemRestor... | python | def make_systemrestoreitem_originalfilename(original_filename, condition='contains', negate=False, preserve_case=False):
"""
Create a node for SystemRestoreItem/OriginalFileName
:return: A IndicatorItem represented as an Element node
"""
document = 'SystemRestoreItem'
search = 'SystemRestor... | [
"def",
"make_systemrestoreitem_originalfilename",
"(",
"original_filename",
",",
"condition",
"=",
"'contains'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'SystemRestoreItem'",
"search",
"=",
"'SystemRestoreItem/Origina... | Create a node for SystemRestoreItem/OriginalFileName
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"SystemRestoreItem",
"/",
"OriginalFileName",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
"an",
"Element",
"node"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L983-L995 |
mandiant/ioc_writer | ioc_writer/ioc_common.py | make_fileitem_peinfo_versioninfoitem | def make_fileitem_peinfo_versioninfoitem(key, value, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/VersionInfoList/VersionInfoItem/ + key name
No validation of the key is performed.
:return: A IndicatorItem represented as an Element node
"""
... | python | def make_fileitem_peinfo_versioninfoitem(key, value, condition='is', negate=False, preserve_case=False):
"""
Create a node for FileItem/PEInfo/VersionInfoList/VersionInfoItem/ + key name
No validation of the key is performed.
:return: A IndicatorItem represented as an Element node
"""
... | [
"def",
"make_fileitem_peinfo_versioninfoitem",
"(",
"key",
",",
"value",
",",
"condition",
"=",
"'is'",
",",
"negate",
"=",
"False",
",",
"preserve_case",
"=",
"False",
")",
":",
"document",
"=",
"'FileItem'",
"search",
"=",
"'FileItem/PEInfo/VersionInfoList/Version... | Create a node for FileItem/PEInfo/VersionInfoList/VersionInfoItem/ + key name
No validation of the key is performed.
:return: A IndicatorItem represented as an Element node | [
"Create",
"a",
"node",
"for",
"FileItem",
"/",
"PEInfo",
"/",
"VersionInfoList",
"/",
"VersionInfoItem",
"/",
"+",
"key",
"name",
"No",
"validation",
"of",
"the",
"key",
"is",
"performed",
".",
":",
"return",
":",
"A",
"IndicatorItem",
"represented",
"as",
... | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_common.py#L1015-L1029 |
mandiant/ioc_writer | ioc_writer/ioc_api.py | fix_schema_node_ordering | def fix_schema_node_ordering(parent):
"""
Fix the ordering of children under the criteria node to ensure that IndicatorItem/Indicator order
is preserved, as per XML Schema.
:return:
"""
children = parent.getchildren()
i_nodes = [node for node in children if node.... | python | def fix_schema_node_ordering(parent):
"""
Fix the ordering of children under the criteria node to ensure that IndicatorItem/Indicator order
is preserved, as per XML Schema.
:return:
"""
children = parent.getchildren()
i_nodes = [node for node in children if node.... | [
"def",
"fix_schema_node_ordering",
"(",
"parent",
")",
":",
"children",
"=",
"parent",
".",
"getchildren",
"(",
")",
"i_nodes",
"=",
"[",
"node",
"for",
"node",
"in",
"children",
"if",
"node",
".",
"tag",
"==",
"'IndicatorItem'",
"]",
"ii_nodes",
"=",
"[",... | Fix the ordering of children under the criteria node to ensure that IndicatorItem/Indicator order
is preserved, as per XML Schema.
:return: | [
"Fix",
"the",
"ordering",
"of",
"children",
"under",
"the",
"criteria",
"node",
"to",
"ensure",
"that",
"IndicatorItem",
"/",
"Indicator",
"order",
"is",
"preserved",
"as",
"per",
"XML",
"Schema",
".",
":",
"return",
":"
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_api.py#L756-L778 |
mandiant/ioc_writer | ioc_writer/ioc_api.py | make_indicator_node | def make_indicator_node(operator, nid=None):
"""
This makes a Indicator node element. These allow the construction of a logic tree within the IOC.
:param operator: String 'AND' or 'OR'. The constants ioc_api.OR and ioc_api.AND may be used as well.
:param nid: This is used to provide a GUID for the In... | python | def make_indicator_node(operator, nid=None):
"""
This makes a Indicator node element. These allow the construction of a logic tree within the IOC.
:param operator: String 'AND' or 'OR'. The constants ioc_api.OR and ioc_api.AND may be used as well.
:param nid: This is used to provide a GUID for the In... | [
"def",
"make_indicator_node",
"(",
"operator",
",",
"nid",
"=",
"None",
")",
":",
"if",
"operator",
".",
"upper",
"(",
")",
"not",
"in",
"VALID_INDICATOR_OPERATORS",
":",
"raise",
"ValueError",
"(",
"'Indicator operator must be in [{}].'",
".",
"format",
"(",
"V... | This makes a Indicator node element. These allow the construction of a logic tree within the IOC.
:param operator: String 'AND' or 'OR'. The constants ioc_api.OR and ioc_api.AND may be used as well.
:param nid: This is used to provide a GUID for the Indicator. The ID should NOT be specified under normal circ... | [
"This",
"makes",
"a",
"Indicator",
"node",
"element",
".",
"These",
"allow",
"the",
"construction",
"of",
"a",
"logic",
"tree",
"within",
"the",
"IOC",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_api.py#L781-L797 |
mandiant/ioc_writer | ioc_writer/ioc_api.py | make_indicatoritem_node | def make_indicatoritem_node(condition,
document,
search,
content_type,
content,
preserve_case=False,
negate=False,
context_t... | python | def make_indicatoritem_node(condition,
document,
search,
content_type,
content,
preserve_case=False,
negate=False,
context_t... | [
"def",
"make_indicatoritem_node",
"(",
"condition",
",",
"document",
",",
"search",
",",
"content_type",
",",
"content",
",",
"preserve_case",
"=",
"False",
",",
"negate",
"=",
"False",
",",
"context_type",
"=",
"'mir'",
",",
"nid",
"=",
"None",
")",
":",
... | This makes a IndicatorItem element. This contains the actual threat intelligence in the IOC.
:param condition: This is the condition of the item ('is', 'contains', 'matches', etc). The following contants in ioc_api may be used:
==================== =====================================================
Constant ... | [
"This",
"makes",
"a",
"IndicatorItem",
"element",
".",
"This",
"contains",
"the",
"actual",
"threat",
"intelligence",
"in",
"the",
"IOC",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_api.py#L800-L859 |
mandiant/ioc_writer | ioc_writer/ioc_api.py | get_top_level_indicator_node | def get_top_level_indicator_node(root_node):
"""
This returns the first top level Indicator node under the criteria node.
:param root_node: Root node of an etree.
:return: an elementTree Element item, or None if no item is found.
"""
if root_node.tag != 'OpenIOC':
raise IOCParseError('R... | python | def get_top_level_indicator_node(root_node):
"""
This returns the first top level Indicator node under the criteria node.
:param root_node: Root node of an etree.
:return: an elementTree Element item, or None if no item is found.
"""
if root_node.tag != 'OpenIOC':
raise IOCParseError('R... | [
"def",
"get_top_level_indicator_node",
"(",
"root_node",
")",
":",
"if",
"root_node",
".",
"tag",
"!=",
"'OpenIOC'",
":",
"raise",
"IOCParseError",
"(",
"'Root tag is not \"OpenIOC\" [{}].'",
".",
"format",
"(",
"root_node",
".",
"tag",
")",
")",
"elems",
"=",
"... | This returns the first top level Indicator node under the criteria node.
:param root_node: Root node of an etree.
:return: an elementTree Element item, or None if no item is found. | [
"This",
"returns",
"the",
"first",
"top",
"level",
"Indicator",
"node",
"under",
"the",
"criteria",
"node",
"."
] | train | https://github.com/mandiant/ioc_writer/blob/712247f3a10bdc2584fa18ac909fc763f71df21a/ioc_writer/ioc_api.py#L862-L882 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.