示例#1
0
def grr_osqueryi_impl(sql: Text) -> pd.DataFrame:
    """Runs given SQL statement on client osquery.

  Args:
    sql: SQL statement to execute.

  Returns:
    Osquery table.

  Raises:
    NoClientSelectedError: Client is not selected to perform this operation.
  """
    if _state.client is None:
        raise NoClientSelectedError()
    return convert.from_osquery_table(_state.client.osquery(sql))
示例#2
0
def osquery_table_pretty(table, p, cycle):
    del cycle  # Unused.
    df = convert.from_osquery_table(table)
    p.text(str(df))
示例#3
0
def osquery_table_pretty(table: osquery_pb2.OsqueryTable,
                         p: pretty.PrettyPrinter, cycle: bool) -> None:
    del cycle  # Unused.
    df = convert.from_osquery_table(table)
    p.text(str(df))