BVB Source Codes

voltron Show command.py Source code

Return Download voltron: download command.py Source code - Download voltron Source code - Type:.py
  1. import logging
  2.  
  3. import voltron
  4. from voltron.api import *
  5.  
  6. from scruffy.plugin import Plugin
  7.  
  8. log = logging.getLogger('api')
  9.  
  10. class APICommandRequest(APIRequest):
  11.     """
  12.    API execute command request.
  13.  
  14.    {
  15.        "type":         "request",
  16.        "request":      "command"
  17.        "data": {
  18.            "command":  "break list"
  19.        }
  20.    }
  21.    """
  22.     _fields = {'command': True}
  23.  
  24.     @server_side
  25.     def dispatch(self):
  26.         try:
  27.             output = voltron.debugger.command(self.command)
  28.             res = APICommandResponse()
  29.             res.output = output
  30.         except NoSuchTargetException:
  31.             res = APINoSuchTargetErrorResponse()
  32.         except Exception as e:
  33.             msg = "Exception executing debugger command: {}".format(repr(e))
  34.             log.exception(msg)
  35.             res = APIGenericErrorResponse(msg)
  36.  
  37.         return res
  38.  
  39.  
  40. class APICommandResponse(APISuccessResponse):
  41.     """
  42.    API list targets response.
  43.  
  44.    {
  45.        "type":         "response",
  46.        "status":       "success",
  47.        "data": {
  48.            "output":   "stuff"
  49.        }
  50.    }
  51.    """
  52.     _fields = {'output': True}
  53.  
  54.     output = None
  55.  
  56.  
  57. class APICommandPlugin(APIPlugin):
  58.     request = "command"
  59.     request_class = APICommandRequest
  60.     response_class = APICommandResponse
  61.  
downloadcommand.py Source code - Download voltron Source code
Related Source Codes/Software:
IGListKit - A data-driven UICollectionView framework for build... 2017-01-11
androidmvp - MVP Android Example 2017-01-11
svelte - The magical disappearing UI framework ... 2017-01-11
kcptun - A Simple UDP Tunnel Based On KCP 2017-01-11
poisontap - Exploits locked/password protected computers over ... 2017-01-10
ecma262 - Status, process, and documents for ECMA262 ... 2017-01-11
react-native-elements - React Native Elements UI Toolkit 2017-01-11
tensorflow-zh - Google new open source ai system TensorFlow Chines... 2017-01-11
forum - Blue light (the Lantern) the official BBS 2017-01-11
socketcluster - Highly scalable realtime framework ... 2017-01-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top