称为非开放管道上的读取

时间:2019-06-02 17:21:51

标签: python thrift osquery

我正在表演一些osquery,但遇到了例外情况

代码

import osquery

inst = osquery.SpawnInstance("C:\\ProgramData\\osquery\\osqueryi.exe")
inst.open()

cursor = inst.client

cursor.query("select name, version from programs;")

完全验收

Traceback (most recent call last):
  File "app.py", line 8, in <module>
    cursor.query("select name, version from programs;")
  File "C:\Users\malware-test\Anaconda3\lib\site-packages\osquery\extensions\ExtensionManager.py", line 181, in query
    self.send_query(sql)
  File "C:\Users\malware-test\Anaconda3\lib\site-packages\osquery\extensions\ExtensionManager.py", line 190, in send_query
    self._oprot.trans.flush()
  File "C:\Users\malware-test\Anaconda3\lib\site-packages\thrift\transport\TTransport.py", line 177, in flush
    self.__trans.write(out)
  File "C:\Users\malware-test\Anaconda3\lib\site-packages\osquery\TPipe.py", line 128, in write
    message='Called read on non-open pipe')
thrift.transport.TTransport.TTransportException: Called read on non-open pipe

1 个答案:

答案 0 :(得分:0)

安装Apache thrift及其python模块后,错误得到解决