MCPcopy
hub / github.com/dreadl0ck/netcap / FileExtractor

Interface FileExtractor

decoder/stream/file/framework.go:64–76  ·  view source on GitHub ↗

FileExtractor is the interface that protocol-specific extractors must implement

Source from the content-addressed store, hash-verified

62
63// FileExtractor is the interface that protocol-specific extractors must implement
64type FileExtractor interface {
65 // GetFileHandle generates a unique identifier for a file in the conversation
66 GetFileHandle(conv *core.ConversationInfo, isOrigin bool, depth int) string
67
68 // DescribeFile returns a human-readable description of the file
69 DescribeFile(handle *FileHandle) string
70
71 // ExtractFile performs the actual file extraction
72 ExtractFile(conv *core.ConversationInfo, data []byte, metadata FileMetadata) error
73
74 // ProtocolName returns the name of the protocol this extractor handles
75 ProtocolName() string
76}
77
78// extractorRegistry holds all registered file extractors
79type extractorRegistry struct {

Callers 8

readResponseMethod · 0.65
readRequestMethod · 0.65
ExtractDCCDataChannelFunction · 0.65
ParseFunction · 0.65
extractFileMethod · 0.65
ExtractDataChannelFunction · 0.65
TestRegisterExtractorFunction · 0.65
RegisterExtractorFunction · 0.65

Implementers 6

HTTPFileExtractordecoder/stream/http/http_file_extracto
IRCFileExtractordecoder/stream/irc/irc_file_extractor.
MockFileExtractordecoder/stream/file/framework_test.go
MailFileExtractordecoder/stream/mail/mail_file_extracto
FTPFileExtractordecoder/stream/ftp/ftp_file_extractor.
SMBFileExtractordecoder/stream/smb/smb_file_extractor.

Calls

no outgoing calls

Tested by

no test coverage detected