You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After any query on del of SpawnInstance I get an ignored exception Exception ignored in <bound method SpawnInstance.__del__ of <osquery.management.SpawnInstance object at 0x021854F0>> pywintypes.error: (1, 'DicsonnectNamedPipe', 'Incorrect function.')
my script: import osquery instance = osquery.SpawnInstance() instance.open() instance.client.query("<some query>")
Now i use some dirty "hack" as after instance.client.query("<some query>")
i do: instance.connection=None
My machine os:
Windows 7x64
This issue remains on version 3.0.6. I used del (calling __del__ internally) to make a more reasonable pipe closing, since there's no close function.
>>> import osquery
>>> instance = osquery.SpawnInstance()
>>> instance.open()
>>> del instance
Exception ignored in: <function SpawnInstance.__del__ at 0x000000D3ABF62678>
Traceback (most recent call last):
File "C:\Users\fakepath\AppData\Local\Programs\Python\Python37\lib\site-packages\osquery\management.py", line 89, in __del__
self.connection.close()
File "C:\Users\fakepath\AppData\Local\Programs\Python\Python37\lib\site-packages\osquery\extension_client.py", line 55, in close
self._transport.close()
File "C:\Users\fakepath\AppData\Local\Programs\Python\Python37\lib\site-packages\thrift\transport\TTransport.py", line 156, in close
return self.__trans.close()
File "C:\Users\fakepath\AppData\Local\Programs\Python\Python37\lib\site-packages\osquery\TPipe.py", line 35, in close
win32pipe.DisconnectNamedPipe(self._handle)
pywintypes.error: (1, 'DisconnectNamedPipe', 'Incorrect function.')
Activity
JarryShaw commentedon Aug 10, 2019
This issue remains on version 3.0.6. I used
del(calling__del__internally) to make a more reasonable pipe closing, since there's noclosefunction.Environment:
osquery-python: 3.0.6ossuary: 3.3.0pywin32: 224Update TPipe.py to replace win32pipe.DisconnectNamedPipe with win32fi…
hotab commentedon Dec 23, 2022
This still happens in 3.0.7 (latest version from pip) on win 10
Problem disappears when using outhex@19691b9 - this fix
Fix 2 issues
filiagees commentedon Apr 10, 2024
@hotab This fix worked for me, too.
Thanks for pointing out.
I'm using win10, with: