Files
portbuster1337-ArachneC2/protobuf/rpcpb/rpc_grpc.pb.go
T
2026-06-03 04:46:26 +08:00

664 lines
23 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v4.25.1
// source: rpcpb/rpc.proto
package rpcpb
import (
context "context"
arachnepb "github.com/portbuster1337/ArachneC2/protobuf/arachnepb"
commonpb "github.com/portbuster1337/ArachneC2/protobuf/commonpb"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
ArachneRPC_GetVersion_FullMethodName = "/rpcpb.ArachneRPC/GetVersion"
ArachneRPC_GetImplants_FullMethodName = "/rpcpb.ArachneRPC/GetImplants"
ArachneRPC_Kill_FullMethodName = "/rpcpb.ArachneRPC/Kill"
ArachneRPC_Ps_FullMethodName = "/rpcpb.ArachneRPC/Ps"
ArachneRPC_Execute_FullMethodName = "/rpcpb.ArachneRPC/Execute"
ArachneRPC_Ls_FullMethodName = "/rpcpb.ArachneRPC/Ls"
ArachneRPC_Pwd_FullMethodName = "/rpcpb.ArachneRPC/Pwd"
ArachneRPC_Download_FullMethodName = "/rpcpb.ArachneRPC/Download"
ArachneRPC_Upload_FullMethodName = "/rpcpb.ArachneRPC/Upload"
ArachneRPC_Screenshot_FullMethodName = "/rpcpb.ArachneRPC/Screenshot"
ArachneRPC_Shell_FullMethodName = "/rpcpb.ArachneRPC/Shell"
ArachneRPC_TunnelData_FullMethodName = "/rpcpb.ArachneRPC/TunnelData"
ArachneRPC_CreateSocks_FullMethodName = "/rpcpb.ArachneRPC/CreateSocks"
ArachneRPC_SocksProxy_FullMethodName = "/rpcpb.ArachneRPC/SocksProxy"
)
// ArachneRPCClient is the client API for ArachneRPC service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ArachneRPCClient interface {
// Operator management
GetVersion(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*Version, error)
GetImplants(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*ImplantList, error)
// Implant interactions
Kill(ctx context.Context, in *arachnepb.KillReq, opts ...grpc.CallOption) (*commonpb.Empty, error)
Ps(ctx context.Context, in *arachnepb.PsReq, opts ...grpc.CallOption) (*arachnepb.Ps, error)
Execute(ctx context.Context, in *arachnepb.ExecuteReq, opts ...grpc.CallOption) (*arachnepb.Execute, error)
Ls(ctx context.Context, in *arachnepb.LsReq, opts ...grpc.CallOption) (*arachnepb.Ls, error)
Pwd(ctx context.Context, in *arachnepb.PwdReq, opts ...grpc.CallOption) (*arachnepb.Pwd, error)
Download(ctx context.Context, in *arachnepb.DownloadReq, opts ...grpc.CallOption) (*arachnepb.Download, error)
Upload(ctx context.Context, in *arachnepb.UploadReq, opts ...grpc.CallOption) (*arachnepb.Upload, error)
Screenshot(ctx context.Context, in *arachnepb.ScreenshotReq, opts ...grpc.CallOption) (*arachnepb.Screenshot, error)
// Session interactions
Shell(ctx context.Context, in *arachnepb.ShellReq, opts ...grpc.CallOption) (*arachnepb.Shell, error)
TunnelData(ctx context.Context, opts ...grpc.CallOption) (ArachneRPC_TunnelDataClient, error)
CreateSocks(ctx context.Context, in *arachnepb.Socks, opts ...grpc.CallOption) (*arachnepb.Socks, error)
SocksProxy(ctx context.Context, opts ...grpc.CallOption) (ArachneRPC_SocksProxyClient, error)
}
type arachneRPCClient struct {
cc grpc.ClientConnInterface
}
func NewArachneRPCClient(cc grpc.ClientConnInterface) ArachneRPCClient {
return &arachneRPCClient{cc}
}
func (c *arachneRPCClient) GetVersion(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*Version, error) {
out := new(Version)
err := c.cc.Invoke(ctx, ArachneRPC_GetVersion_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) GetImplants(ctx context.Context, in *commonpb.Empty, opts ...grpc.CallOption) (*ImplantList, error) {
out := new(ImplantList)
err := c.cc.Invoke(ctx, ArachneRPC_GetImplants_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Kill(ctx context.Context, in *arachnepb.KillReq, opts ...grpc.CallOption) (*commonpb.Empty, error) {
out := new(commonpb.Empty)
err := c.cc.Invoke(ctx, ArachneRPC_Kill_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Ps(ctx context.Context, in *arachnepb.PsReq, opts ...grpc.CallOption) (*arachnepb.Ps, error) {
out := new(arachnepb.Ps)
err := c.cc.Invoke(ctx, ArachneRPC_Ps_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Execute(ctx context.Context, in *arachnepb.ExecuteReq, opts ...grpc.CallOption) (*arachnepb.Execute, error) {
out := new(arachnepb.Execute)
err := c.cc.Invoke(ctx, ArachneRPC_Execute_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Ls(ctx context.Context, in *arachnepb.LsReq, opts ...grpc.CallOption) (*arachnepb.Ls, error) {
out := new(arachnepb.Ls)
err := c.cc.Invoke(ctx, ArachneRPC_Ls_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Pwd(ctx context.Context, in *arachnepb.PwdReq, opts ...grpc.CallOption) (*arachnepb.Pwd, error) {
out := new(arachnepb.Pwd)
err := c.cc.Invoke(ctx, ArachneRPC_Pwd_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Download(ctx context.Context, in *arachnepb.DownloadReq, opts ...grpc.CallOption) (*arachnepb.Download, error) {
out := new(arachnepb.Download)
err := c.cc.Invoke(ctx, ArachneRPC_Download_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Upload(ctx context.Context, in *arachnepb.UploadReq, opts ...grpc.CallOption) (*arachnepb.Upload, error) {
out := new(arachnepb.Upload)
err := c.cc.Invoke(ctx, ArachneRPC_Upload_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Screenshot(ctx context.Context, in *arachnepb.ScreenshotReq, opts ...grpc.CallOption) (*arachnepb.Screenshot, error) {
out := new(arachnepb.Screenshot)
err := c.cc.Invoke(ctx, ArachneRPC_Screenshot_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) Shell(ctx context.Context, in *arachnepb.ShellReq, opts ...grpc.CallOption) (*arachnepb.Shell, error) {
out := new(arachnepb.Shell)
err := c.cc.Invoke(ctx, ArachneRPC_Shell_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) TunnelData(ctx context.Context, opts ...grpc.CallOption) (ArachneRPC_TunnelDataClient, error) {
stream, err := c.cc.NewStream(ctx, &ArachneRPC_ServiceDesc.Streams[0], ArachneRPC_TunnelData_FullMethodName, opts...)
if err != nil {
return nil, err
}
x := &arachneRPCTunnelDataClient{stream}
return x, nil
}
type ArachneRPC_TunnelDataClient interface {
Send(*arachnepb.TunnelData) error
Recv() (*arachnepb.TunnelData, error)
grpc.ClientStream
}
type arachneRPCTunnelDataClient struct {
grpc.ClientStream
}
func (x *arachneRPCTunnelDataClient) Send(m *arachnepb.TunnelData) error {
return x.ClientStream.SendMsg(m)
}
func (x *arachneRPCTunnelDataClient) Recv() (*arachnepb.TunnelData, error) {
m := new(arachnepb.TunnelData)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *arachneRPCClient) CreateSocks(ctx context.Context, in *arachnepb.Socks, opts ...grpc.CallOption) (*arachnepb.Socks, error) {
out := new(arachnepb.Socks)
err := c.cc.Invoke(ctx, ArachneRPC_CreateSocks_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *arachneRPCClient) SocksProxy(ctx context.Context, opts ...grpc.CallOption) (ArachneRPC_SocksProxyClient, error) {
stream, err := c.cc.NewStream(ctx, &ArachneRPC_ServiceDesc.Streams[1], ArachneRPC_SocksProxy_FullMethodName, opts...)
if err != nil {
return nil, err
}
x := &arachneRPCSocksProxyClient{stream}
return x, nil
}
type ArachneRPC_SocksProxyClient interface {
Send(*arachnepb.SocksData) error
Recv() (*arachnepb.SocksData, error)
grpc.ClientStream
}
type arachneRPCSocksProxyClient struct {
grpc.ClientStream
}
func (x *arachneRPCSocksProxyClient) Send(m *arachnepb.SocksData) error {
return x.ClientStream.SendMsg(m)
}
func (x *arachneRPCSocksProxyClient) Recv() (*arachnepb.SocksData, error) {
m := new(arachnepb.SocksData)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// ArachneRPCServer is the server API for ArachneRPC service.
// All implementations must embed UnimplementedArachneRPCServer
// for forward compatibility
type ArachneRPCServer interface {
// Operator management
GetVersion(context.Context, *commonpb.Empty) (*Version, error)
GetImplants(context.Context, *commonpb.Empty) (*ImplantList, error)
// Implant interactions
Kill(context.Context, *arachnepb.KillReq) (*commonpb.Empty, error)
Ps(context.Context, *arachnepb.PsReq) (*arachnepb.Ps, error)
Execute(context.Context, *arachnepb.ExecuteReq) (*arachnepb.Execute, error)
Ls(context.Context, *arachnepb.LsReq) (*arachnepb.Ls, error)
Pwd(context.Context, *arachnepb.PwdReq) (*arachnepb.Pwd, error)
Download(context.Context, *arachnepb.DownloadReq) (*arachnepb.Download, error)
Upload(context.Context, *arachnepb.UploadReq) (*arachnepb.Upload, error)
Screenshot(context.Context, *arachnepb.ScreenshotReq) (*arachnepb.Screenshot, error)
// Session interactions
Shell(context.Context, *arachnepb.ShellReq) (*arachnepb.Shell, error)
TunnelData(ArachneRPC_TunnelDataServer) error
CreateSocks(context.Context, *arachnepb.Socks) (*arachnepb.Socks, error)
SocksProxy(ArachneRPC_SocksProxyServer) error
mustEmbedUnimplementedArachneRPCServer()
}
// UnimplementedArachneRPCServer must be embedded to have forward compatible implementations.
type UnimplementedArachneRPCServer struct {
}
func (UnimplementedArachneRPCServer) GetVersion(context.Context, *commonpb.Empty) (*Version, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented")
}
func (UnimplementedArachneRPCServer) GetImplants(context.Context, *commonpb.Empty) (*ImplantList, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetImplants not implemented")
}
func (UnimplementedArachneRPCServer) Kill(context.Context, *arachnepb.KillReq) (*commonpb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Kill not implemented")
}
func (UnimplementedArachneRPCServer) Ps(context.Context, *arachnepb.PsReq) (*arachnepb.Ps, error) {
return nil, status.Errorf(codes.Unimplemented, "method Ps not implemented")
}
func (UnimplementedArachneRPCServer) Execute(context.Context, *arachnepb.ExecuteReq) (*arachnepb.Execute, error) {
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
}
func (UnimplementedArachneRPCServer) Ls(context.Context, *arachnepb.LsReq) (*arachnepb.Ls, error) {
return nil, status.Errorf(codes.Unimplemented, "method Ls not implemented")
}
func (UnimplementedArachneRPCServer) Pwd(context.Context, *arachnepb.PwdReq) (*arachnepb.Pwd, error) {
return nil, status.Errorf(codes.Unimplemented, "method Pwd not implemented")
}
func (UnimplementedArachneRPCServer) Download(context.Context, *arachnepb.DownloadReq) (*arachnepb.Download, error) {
return nil, status.Errorf(codes.Unimplemented, "method Download not implemented")
}
func (UnimplementedArachneRPCServer) Upload(context.Context, *arachnepb.UploadReq) (*arachnepb.Upload, error) {
return nil, status.Errorf(codes.Unimplemented, "method Upload not implemented")
}
func (UnimplementedArachneRPCServer) Screenshot(context.Context, *arachnepb.ScreenshotReq) (*arachnepb.Screenshot, error) {
return nil, status.Errorf(codes.Unimplemented, "method Screenshot not implemented")
}
func (UnimplementedArachneRPCServer) Shell(context.Context, *arachnepb.ShellReq) (*arachnepb.Shell, error) {
return nil, status.Errorf(codes.Unimplemented, "method Shell not implemented")
}
func (UnimplementedArachneRPCServer) TunnelData(ArachneRPC_TunnelDataServer) error {
return status.Errorf(codes.Unimplemented, "method TunnelData not implemented")
}
func (UnimplementedArachneRPCServer) CreateSocks(context.Context, *arachnepb.Socks) (*arachnepb.Socks, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateSocks not implemented")
}
func (UnimplementedArachneRPCServer) SocksProxy(ArachneRPC_SocksProxyServer) error {
return status.Errorf(codes.Unimplemented, "method SocksProxy not implemented")
}
func (UnimplementedArachneRPCServer) mustEmbedUnimplementedArachneRPCServer() {}
// UnsafeArachneRPCServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ArachneRPCServer will
// result in compilation errors.
type UnsafeArachneRPCServer interface {
mustEmbedUnimplementedArachneRPCServer()
}
func RegisterArachneRPCServer(s grpc.ServiceRegistrar, srv ArachneRPCServer) {
s.RegisterService(&ArachneRPC_ServiceDesc, srv)
}
func _ArachneRPC_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).GetVersion(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_GetVersion_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).GetVersion(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_GetImplants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(commonpb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).GetImplants(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_GetImplants_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).GetImplants(ctx, req.(*commonpb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Kill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.KillReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Kill(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Kill_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Kill(ctx, req.(*arachnepb.KillReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Ps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.PsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Ps(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Ps_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Ps(ctx, req.(*arachnepb.PsReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.ExecuteReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Execute(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Execute_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Execute(ctx, req.(*arachnepb.ExecuteReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Ls_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.LsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Ls(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Ls_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Ls(ctx, req.(*arachnepb.LsReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Pwd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.PwdReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Pwd(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Pwd_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Pwd(ctx, req.(*arachnepb.PwdReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Download_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.DownloadReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Download(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Download_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Download(ctx, req.(*arachnepb.DownloadReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Upload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.UploadReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Upload(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Upload_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Upload(ctx, req.(*arachnepb.UploadReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Screenshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.ScreenshotReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Screenshot(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Screenshot_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Screenshot(ctx, req.(*arachnepb.ScreenshotReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_Shell_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.ShellReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).Shell(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_Shell_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).Shell(ctx, req.(*arachnepb.ShellReq))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_TunnelData_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(ArachneRPCServer).TunnelData(&arachneRPCTunnelDataServer{stream})
}
type ArachneRPC_TunnelDataServer interface {
Send(*arachnepb.TunnelData) error
Recv() (*arachnepb.TunnelData, error)
grpc.ServerStream
}
type arachneRPCTunnelDataServer struct {
grpc.ServerStream
}
func (x *arachneRPCTunnelDataServer) Send(m *arachnepb.TunnelData) error {
return x.ServerStream.SendMsg(m)
}
func (x *arachneRPCTunnelDataServer) Recv() (*arachnepb.TunnelData, error) {
m := new(arachnepb.TunnelData)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _ArachneRPC_CreateSocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(arachnepb.Socks)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ArachneRPCServer).CreateSocks(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: ArachneRPC_CreateSocks_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ArachneRPCServer).CreateSocks(ctx, req.(*arachnepb.Socks))
}
return interceptor(ctx, in, info, handler)
}
func _ArachneRPC_SocksProxy_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(ArachneRPCServer).SocksProxy(&arachneRPCSocksProxyServer{stream})
}
type ArachneRPC_SocksProxyServer interface {
Send(*arachnepb.SocksData) error
Recv() (*arachnepb.SocksData, error)
grpc.ServerStream
}
type arachneRPCSocksProxyServer struct {
grpc.ServerStream
}
func (x *arachneRPCSocksProxyServer) Send(m *arachnepb.SocksData) error {
return x.ServerStream.SendMsg(m)
}
func (x *arachneRPCSocksProxyServer) Recv() (*arachnepb.SocksData, error) {
m := new(arachnepb.SocksData)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// ArachneRPC_ServiceDesc is the grpc.ServiceDesc for ArachneRPC service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ArachneRPC_ServiceDesc = grpc.ServiceDesc{
ServiceName: "rpcpb.ArachneRPC",
HandlerType: (*ArachneRPCServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetVersion",
Handler: _ArachneRPC_GetVersion_Handler,
},
{
MethodName: "GetImplants",
Handler: _ArachneRPC_GetImplants_Handler,
},
{
MethodName: "Kill",
Handler: _ArachneRPC_Kill_Handler,
},
{
MethodName: "Ps",
Handler: _ArachneRPC_Ps_Handler,
},
{
MethodName: "Execute",
Handler: _ArachneRPC_Execute_Handler,
},
{
MethodName: "Ls",
Handler: _ArachneRPC_Ls_Handler,
},
{
MethodName: "Pwd",
Handler: _ArachneRPC_Pwd_Handler,
},
{
MethodName: "Download",
Handler: _ArachneRPC_Download_Handler,
},
{
MethodName: "Upload",
Handler: _ArachneRPC_Upload_Handler,
},
{
MethodName: "Screenshot",
Handler: _ArachneRPC_Screenshot_Handler,
},
{
MethodName: "Shell",
Handler: _ArachneRPC_Shell_Handler,
},
{
MethodName: "CreateSocks",
Handler: _ArachneRPC_CreateSocks_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "TunnelData",
Handler: _ArachneRPC_TunnelData_Handler,
ServerStreams: true,
ClientStreams: true,
},
{
StreamName: "SocksProxy",
Handler: _ArachneRPC_SocksProxy_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "rpcpb/rpc.proto",
}