C3/Src/ChannelLinter
Pawel Kurowski 8cf356c1a3 LinterOverlapped fix review comments 2020-08-31 13:20:01 +02:00
..
AppConfig.hpp Add new -o overlapped mode to ChannelLinter 2020-08-19 16:55:35 +02:00
ArgumentParser.cpp Add new -o overlapped mode to ChannelLinter 2020-08-19 16:55:35 +02:00
ArgumentParser.h Change MWR namespace to FSecure 2020-03-05 16:30:50 +01:00
ChannelLinter.cpp LinterOverlapped fix review comments 2020-08-31 13:20:01 +02:00
ChannelLinter.h Add new -o overlapped mode to ChannelLinter 2020-08-19 16:55:35 +02:00
ChannelLinter.vcxproj Add missing winhttp.lib to dependencies 2020-04-09 17:56:17 +02:00
ChannelLinter.vcxproj.filters Remove os version manifest 2020-03-19 18:22:29 +01:00
ChannelLinterMain.cpp Merge branch 'ClangMsvcCompat' 2020-03-06 15:23:57 +01:00
Form.cpp Change MWR namespace to FSecure 2020-03-05 16:30:50 +01:00
Form.h Change MWR namespace to FSecure 2020-03-05 16:30:50 +01:00
FormElement.cpp Merge branch 'ClangMsvcCompat' 2020-03-06 15:23:57 +01:00
FormElement.h Merge branch 'ClangMsvcCompat' 2020-03-06 15:23:57 +01:00
MockDeviceBridge.cpp LinterOverlapped fix review comments 2020-08-31 13:20:01 +02:00
MockDeviceBridge.h LinterOverlapped fix review comments 2020-08-31 13:20:01 +02:00
README.md Add detailed help to channel linter 2020-02-19 15:04:37 +01:00
StdAfx.h Change MWR namespace to FSecure 2020-03-05 16:30:50 +01:00
Stdafx.cpp Create stub for C3 channel linter 2019-11-18 14:42:21 +01:00
argparse.hpp Refactor the application object 2019-11-18 14:42:22 +01:00

README.md

C3 Channel Linter

Tool to ease the development and debugging of channels. Main goal is to provide a simple application to test channels without the need of spinning up the whole C3 network.

Usage

This tool provides console frontend for channel usage.

Usage: ChannelLinter.exe {-h|-l|-n NAME [options]}
Mode:
  -h, --help            Show this message and exit.

  -l, --list            List registered Channels and exit.

  -n <NAME>, --name <NAME>
                        Select channel with given <NAME> for further processing

Options:
  -a [ARGS...], --args [ARGS...]
                        Create channel with given ARGS using the Capability/create/arguments.

  -c [ARGS...], --complementary [ARGS...]
                        Create a complementary channel with given ARGS.

  -i, --test-io         Create a pair of channels and send packets through.
                        If this option is present -a [ARGS...] must be specified.
                        If -c is not present, complementary channel arguments are deduced by swapping
                        parameters from Capability/create/arguments arrays.

  -x <ID> [ARGS... ], --command <ID> [ARGS... ]
                        Execute a command with a given <ID> and arguments [ARGS...]

Example workflows:

  1. Parse the json returned from GetCapability() and validate it against C3 rules: -n ChannelName --name ChannelName e.g. ChannelLinter.exe -n UncShareFile Note: ChannelName is case sensitive and must be same as used for the class name.
  2. Create instance of a channel: -a [Argument1 Argument2 ...] --args [Argument1 Argument2 ...] e.g. ChannelLinter.exe -n UncShareFile --args inputId outputId C:\Temp\C3Store false Note: Messeges logged by calls to this->Log() will not be displayed if the channel constructor throws.
  3. Test channel permeability - create a complemetary pair of channels and send messages through. -i --test-io e.g. ChannelLinter.exe -n UncShareFile --args inputId outputId C:\Temp\C3Store false -i
  4. Execute channel commmand: -x commandId [Argument1 Argument2 ...] --command commandId [Argument1 Argument2 ...] e.g. ChannelLinter.exe -n UncShareFile --args inputId outputId C:\Temp\C3Store false -x 0