本文整理汇总了Python中win32service.SERVICE_STOP_PENDING属性的典型用法代码示例。如果您正苦于以下问题:Python win32service.SERVICE_STOP_PENDING属性的具体用法?Python win32service.SERVICE_STOP_PENDING怎么用?Python win32service.SERVICE_STOP_PENDING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类win32service
的用法示例。
在下文中一共展示了win32service.SERVICE_STOP_PENDING属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
from cherrypy import process
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
process.bus.exit()
示例2: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.hWaitStop)
self.isAlive = False
示例3: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
SetEvent(self.hWaitStop)
示例4: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.hWaitStop)
示例5: SvcRun
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcRun(self):
self.ReportServiceStatus(win32service.SERVICE_RUNNING)
self.SvcDoRun()
# Once SvcDoRun terminates, the service has stopped.
# We tell the SCM the service is still stopping - the C framework
# will automatically tell the SCM it has stopped when this returns.
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
示例6: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
'''
Called when the service is asked to stop
'''
self.stop()
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.hWaitStop)
示例7: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
cherrypy.engine.exit()
self.ReportServiceStatus(win32service.SERVICE_STOPPED)
# very important for use with py2exe
# otherwise the Service Controller never knows that it is stopped !
示例8: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.hWaitStop)
self._running = False
示例9: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.log("Stopping scalyr service")
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self._stop_event)
self.controller.invoke_termination_handler()
self.ReportServiceStatus(win32service.SERVICE_STOPPED)
示例10: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
import servicemanager
msg = "stopping."
try:
# There's no way to say this nicely
self.process_handle.terminate()
except Exception as exc:
msg = exc.message
pass
servicemanager.LogInfoMsg(self._svc_name_ + " - Received stop signal; " + msg)
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
self.isAlive = False
示例11: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
import servicemanager
# tell windows SCM we're shutting down
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
servicemanager.LogInfoMsg("OpsBro Start")
# launch the stop event
win32event.SetEvent(self.hWaitStop)
示例12: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
win32event.SetEvent(self.hWaitStop)
示例13: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(svc.SERVICE_STOP_PENDING)
self.stop()
self.ReportServiceStatus(svc.SERVICE_STOPPED)
示例14: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
self.stop()
self.ReportServiceStatus(win32service.SERVICE_STOPPED)
示例15: SvcStop
# 需要导入模块: import win32service [as 别名]
# 或者: from win32service import SERVICE_STOP_PENDING [as 别名]
def SvcStop(self):
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) #tell the Service Manager that we are planing to stop the serivce
self.stop()
self.ReportServiceStatus(win32service.SERVICE_STOPPED) #tell the Service Manager that we are currently stopping the service
开发者ID:PacktPublishing,项目名称:Python-for-Offensive-PenTest,代码行数:6,代码来源:Backdoor-ing Legitmate Windows Service.py