● Notice //GitHub (@shehzade) is temporarily suspended pending an automated false-positive review. All tools are hosted on this Code Mirror and available on request (contact); GitHub links will return once reinstated.
PUBLIC MIRRORGo v1.0

Multi-protocol network egress assessment and DLP verification framework featuring automated L4 sweeps, corporate proxy traversal, and covert protocol smuggling across 20+ channels.

$ git clone https://shehzade.io/repos/contraband.git Copy
Source ZIP (1.93 MB)
Code 174 Commits 1
contraband / proto / exfil_grpc.pb.go
← Back to directory
153 lines · 6.1 KB
Raw
1// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2// versions:
3// - protoc-gen-go-grpc v1.6.2
4// - protoc v3.21.12
5// source: proto/exfil.proto
6
7package proto
8
9import (
10 context "context"
11 grpc "google.golang.org/grpc"
12 codes "google.golang.org/grpc/codes"
13 status "google.golang.org/grpc/status"
14)
15
16// This is a compile-time assertion to ensure that this generated file
17// is compatible with the grpc package it is being compiled against.
18// Requires gRPC-Go v1.64.0 or later.
19const _ = grpc.SupportPackageIsVersion9
20
21const (
22 ExfilService_UploadChunk_FullMethodName = "/contraband.ExfilService/UploadChunk"
23 ExfilService_UploadStream_FullMethodName = "/contraband.ExfilService/UploadStream"
24)
25
26// ExfilServiceClient is the client API for ExfilService service.
27//
28// 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.
29type ExfilServiceClient interface {
30 UploadChunk(ctx context.Context, in *ChunkRequest, opts ...grpc.CallOption) (*ChunkResponse, error)
31 UploadStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ChunkRequest, ChunkResponse], error)
32}
33
34type exfilServiceClient struct {
35 cc grpc.ClientConnInterface
36}
37
38func NewExfilServiceClient(cc grpc.ClientConnInterface) ExfilServiceClient {
39 return &exfilServiceClient{cc}
40}
41
42func (c *exfilServiceClient) UploadChunk(ctx context.Context, in *ChunkRequest, opts ...grpc.CallOption) (*ChunkResponse, error) {
43 cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
44 out := new(ChunkResponse)
45 err := c.cc.Invoke(ctx, ExfilService_UploadChunk_FullMethodName, in, out, cOpts...)
46 if err != nil {
47 return nil, err
48 }
49 return out, nil
50}
51
52func (c *exfilServiceClient) UploadStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[ChunkRequest, ChunkResponse], error) {
53 cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
54 stream, err := c.cc.NewStream(ctx, &ExfilService_ServiceDesc.Streams[0], ExfilService_UploadStream_FullMethodName, cOpts...)
55 if err != nil {
56 return nil, err
57 }
58 x := &grpc.GenericClientStream[ChunkRequest, ChunkResponse]{ClientStream: stream}
59 return x, nil
60}
61
62// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
63type ExfilService_UploadStreamClient = grpc.ClientStreamingClient[ChunkRequest, ChunkResponse]
64
65// ExfilServiceServer is the server API for ExfilService service.
66// All implementations must embed UnimplementedExfilServiceServer
67// for forward compatibility.
68type ExfilServiceServer interface {
69 UploadChunk(context.Context, *ChunkRequest) (*ChunkResponse, error)
70 UploadStream(grpc.ClientStreamingServer[ChunkRequest, ChunkResponse]) error
71 mustEmbedUnimplementedExfilServiceServer()
72}
73
74// UnimplementedExfilServiceServer must be embedded to have
75// forward compatible implementations.
76//
77// NOTE: this should be embedded by value instead of pointer to avoid a nil
78// pointer dereference when methods are called.
79type UnimplementedExfilServiceServer struct{}
80
81func (UnimplementedExfilServiceServer) UploadChunk(context.Context, *ChunkRequest) (*ChunkResponse, error) {
82 return nil, status.Error(codes.Unimplemented, "method UploadChunk not implemented")
83}
84func (UnimplementedExfilServiceServer) UploadStream(grpc.ClientStreamingServer[ChunkRequest, ChunkResponse]) error {
85 return status.Error(codes.Unimplemented, "method UploadStream not implemented")
86}
87func (UnimplementedExfilServiceServer) mustEmbedUnimplementedExfilServiceServer() {}
88func (UnimplementedExfilServiceServer) testEmbeddedByValue() {}
89
90// UnsafeExfilServiceServer may be embedded to opt out of forward compatibility for this service.
91// Use of this interface is not recommended, as added methods to ExfilServiceServer will
92// result in compilation errors.
93type UnsafeExfilServiceServer interface {
94 mustEmbedUnimplementedExfilServiceServer()
95}
96
97func RegisterExfilServiceServer(s grpc.ServiceRegistrar, srv ExfilServiceServer) {
98 // If the following call panics, it indicates UnimplementedExfilServiceServer was
99 // embedded by pointer and is nil. This will cause panics if an
100 // unimplemented method is ever invoked, so we test this at initialization
101 // time to prevent it from happening at runtime later due to I/O.
102 if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
103 t.testEmbeddedByValue()
104 }
105 s.RegisterService(&ExfilService_ServiceDesc, srv)
106}
107
108func _ExfilService_UploadChunk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
109 in := new(ChunkRequest)
110 if err := dec(in); err != nil {
111 return nil, err
112 }
113 if interceptor == nil {
114 return srv.(ExfilServiceServer).UploadChunk(ctx, in)
115 }
116 info := &grpc.UnaryServerInfo{
117 Server: srv,
118 FullMethod: ExfilService_UploadChunk_FullMethodName,
119 }
120 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
121 return srv.(ExfilServiceServer).UploadChunk(ctx, req.(*ChunkRequest))
122 }
123 return interceptor(ctx, in, info, handler)
124}
125
126func _ExfilService_UploadStream_Handler(srv interface{}, stream grpc.ServerStream) error {
127 return srv.(ExfilServiceServer).UploadStream(&grpc.GenericServerStream[ChunkRequest, ChunkResponse]{ServerStream: stream})
128}
129
130// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
131type ExfilService_UploadStreamServer = grpc.ClientStreamingServer[ChunkRequest, ChunkResponse]
132
133// ExfilService_ServiceDesc is the grpc.ServiceDesc for ExfilService service.
134// It's only intended for direct use with grpc.RegisterService,
135// and not to be introspected or modified (even as a copy)
136var ExfilService_ServiceDesc = grpc.ServiceDesc{
137 ServiceName: "contraband.ExfilService",
138 HandlerType: (*ExfilServiceServer)(nil),
139 Methods: []grpc.MethodDesc{
140 {
141 MethodName: "UploadChunk",
142 Handler: _ExfilService_UploadChunk_Handler,
143 },
144 },
145 Streams: []grpc.StreamDesc{
146 {
147 StreamName: "UploadStream",
148 Handler: _ExfilService_UploadStream_Handler,
149 ClientStreams: true,
150 },
151 },
152 Metadata: "proto/exfil.proto",
153}