-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70d94ad
commit 7ba5509
Showing
14 changed files
with
1,294 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
syntax = "proto3"; | ||
|
||
// Enum for cmd_type_t | ||
enum CmdType { | ||
CMD_EXEC = 0; | ||
CMD_DLOPEN = 1; | ||
CMD_DLCLOSE = 2; | ||
CMD_DLSYM = 3; | ||
CMD_CALL = 4; | ||
CMD_PEEK = 5; | ||
CMD_POKE = 6; | ||
CMD_REPLY_ERROR = 7; | ||
CMD_REPLY_PEEK = 8; | ||
CMD_GET_DUMMY_BLOCK = 9; | ||
CMD_CLOSE = 10; | ||
CMD_REPLY_POKE = 11; | ||
CMD_LISTDIR = 12; | ||
CMD_SHOWOBJECT = 13; | ||
CMD_SHOWCLASS = 14; | ||
CMD_GET_CLASS_LIST = 15; | ||
} | ||
|
||
// Enum for arch_t | ||
enum ArchType { | ||
ARCH_UNKNOWN = 0; | ||
ARCH_ARM64 = 1; | ||
} | ||
|
||
// Struct for protocol_handshake_t | ||
message ProtocolHandshake { | ||
int32 magic = 1; | ||
ArchType arch = 2; | ||
string sysname = 3; | ||
string machine = 4; | ||
} | ||
|
||
// Struct for cmd_exec_t | ||
message CmdExec { | ||
int32 background = 1; | ||
repeated string argv = 2; | ||
repeated string envp = 3; | ||
} | ||
|
||
// Struct for cmd_dlopen_t | ||
message CmdDlopen { | ||
string filename = 1; | ||
int32 mode = 2; | ||
} | ||
|
||
// Struct for cmd_dlclose_t | ||
message CmdDlclose { | ||
int64 lib = 1; | ||
} | ||
|
||
// Struct for cmd_dlsym_t | ||
message CmdDlsym { | ||
int64 lib = 1; | ||
string symbol_name = 2; | ||
} | ||
|
||
// Enum for argument_type_t | ||
enum ArgumentType { | ||
INTEGER = 0; | ||
DOUBLE = 1; | ||
} | ||
|
||
// Struct for argument_t | ||
message Argument { | ||
ArgumentType type = 1; | ||
oneof value { | ||
int64 int_value = 2; | ||
double double_value = 3; | ||
} | ||
} | ||
|
||
// Struct for cmd_call_t | ||
message CmdCall { | ||
int64 address = 1; | ||
int64 va_list_index = 2; | ||
repeated Argument argv = 3; | ||
} | ||
|
||
// Struct for cmd_peek_t | ||
message CmdPeek { | ||
int64 address = 1; | ||
int64 size = 2; | ||
} | ||
|
||
// Struct for cmd_poke_t | ||
message CmdPoke { | ||
int64 address = 1; | ||
int64 size = 2; | ||
bytes data = 3; | ||
} | ||
|
||
// Struct for cmd_dirlist_t | ||
message CmdDirlist { | ||
string filename = 1; | ||
} | ||
|
||
// Struct for cmd_showobject_t | ||
message CmdShowobject { | ||
int64 address = 1; | ||
} | ||
|
||
// Struct for cmd_showclass_t | ||
message CmdShowclass { | ||
int64 address = 1; | ||
} | ||
|
||
// Struct for listdir_entry_stat_t | ||
message ListdirEntryStat { | ||
int64 errno = 1; | ||
int64 st_dev = 2; | ||
int64 st_mode = 3; | ||
int64 st_nlink = 4; | ||
int64 st_ino = 5; | ||
int64 st_uid = 6; | ||
int64 st_gid = 7; | ||
int64 st_rdev = 8; | ||
int64 st_size = 9; | ||
int64 st_blocks = 10; | ||
int64 st_blksize = 11; | ||
int64 st_atime = 12; | ||
int64 st_mtime = 13; | ||
int64 st_ctime = 14; | ||
} | ||
|
||
// Struct for listdir_entry_t | ||
message ListdirEntry { | ||
int64 d_type = 1; | ||
int64 d_namlen = 2; | ||
ListdirEntryStat lstat = 3; | ||
ListdirEntryStat stat = 4; | ||
} | ||
|
||
// Struct for protocol_message_t | ||
message ProtocolMessage { | ||
int32 magic = 1; | ||
CmdType cmd_type = 2; | ||
oneof data { | ||
CmdExec cmd_exec = 3; | ||
CmdDlopen cmd_dlopen = 4; | ||
CmdDlclose cmd_dlclose = 5; | ||
CmdDlsym cmd_dlsym = 6; | ||
CmdCall cmd_call = 7; | ||
CmdPeek cmd_peek = 8; | ||
CmdPoke cmd_poke = 9; | ||
CmdDirlist cmd_dirlist = 10; | ||
CmdShowobject cmd_showobject = 11; | ||
CmdShowclass cmd_showclass = 12; | ||
} | ||
} | ||
|
||
// Struct for reply_protocol_message_t | ||
message ReplyProtocolMessage { | ||
int32 magic = 1; | ||
CmdType cmd_type = 2; | ||
} | ||
|
||
// Enum for exec_chunk_type_t | ||
enum ExecChunkType { | ||
CMD_EXEC_CHUNK_TYPE_STDOUT = 0; | ||
CMD_EXEC_CHUNK_TYPE_ERRORCODE = 1; | ||
} | ||
|
||
// Struct for exec_chunk_t | ||
message ExecChunk { | ||
ExecChunkType chunk_type = 1; | ||
int32 size = 2; | ||
} | ||
|
||
// Struct for return_registers_arm_t | ||
message ReturnRegistersArm { | ||
repeated int64 x = 1; | ||
repeated double d = 2; | ||
} | ||
|
||
// Struct for call_response_t | ||
message CallResponse { | ||
oneof return_values { | ||
ReturnRegistersArm arm_registers = 1; | ||
int64 return_value | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.