FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
voltron/voltron/plugins/api/command.py at master · LiptonB/voltron · GitHub
LiptonB
/
voltron
Public
forked from
snare/voltron
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
voltron
/
voltron
/
plugins
/
api
/
command.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
60 lines (47 loc) · 1.26 KB
Breadcrumbs
voltron
/
voltron
/
plugins
/
api
/
command.py
Copy path
File metadata and controls
60 lines (47 loc) · 1.26 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import
logging
import
voltron
from
voltron
.
api
import
*
from
scruffy
.
plugin
import
Plugin
log
=
logging
.
getLogger
(
'api'
)
class
APICommandRequest
(
APIRequest
):
"""
API execute command request.
{
"type": "request",
"request": "command"
"data": {
"command": "break list"
}
}
"""
_fields
=
{
'command'
:
True
}
@
server_side
def
dispatch
(
self
):
try
:
output
=
voltron
.
debugger
.
command
(
self
.
command
)
res
=
APICommandResponse
()
res
.
output
=
output
except
NoSuchTargetException
:
res
=
APINoSuchTargetErrorResponse
()
except
Exception
as
e
:
msg
=
"Exception executing debugger command: {}"
.
format
(
e
)
log
.
exception
(
msg
)
res
=
APIGenericErrorResponse
(
msg
)
return
res
class
APICommandResponse
(
APISuccessResponse
):
"""
API list targets response.
{
"type": "response",
"status": "success",
"data": {
"output": "stuff"
}
}
"""
_fields
=
{
'output'
:
True
}
output
=
None
class
APICommandPlugin
(
APIPlugin
):
request
=
"command"
request_class
=
APICommandRequest
response_class
=
APICommandResponse
Back
|
FazBrowse Home
|
New Git URL