serial-mitm
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

serial-mitm 0.2.0

Machine-in-the-middle (MITM) serial port traffic

pipeline status serial-mitm on NPM license developtment time contributor covenant support development

Person-in-the-middle serial communications. Requires virtual com ports, like those created by com0com Windows or socat on Linux.

Usage

Node Module

import { createSpy } from 'serial-spy';

const spy = createSpy({
	port1: '/dev/tty0',
	baudrate1: 19200,
	port2: '/dev/tty1',
	baudrate2: 19200
});

spy.on('error', (error, port) => console.error('Error on port', port, error));

spy.on('data', (data, port) => console.log('Data on port', port, data));

Command Line Interface

Usage:
serial-spy [-h] [-1 <port1>[,<baudrate1>] [-2 <port1>[,<baudrate2>]]

  -1 <port1>[,<baudrate1>]   The first port (and optionally baudrate) to
      person-in-the-middle
  -2 <port2>[,<baudrate2>]   The second port (and optionally baudrate) to
      person-in-the-middle
  -H,--hex                   Display all data as hex
  -h,--help                  Show this help

Development

Feel free to post errors or feature requests to the project issue tracker or email them to us. Please submit security concerns as a confidential issue

The source is hosted on Gitlab and uses eslint, prettier, lint-staged and husky to keep things pretty. As such, when you first clone the repository, as well as installing the npm dependencies, you will also need to install husky.

# Install NPM dependencies
npm install
# Set up husky Git hooks stored in .husky
npx husky install

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.2.0 - 2022-06-30

Fixed

  • Fixed errors due to undefined variables in serial-mitm command

Added

  • Port labels to serial-mitm command by adding third optional port argument e.g. -1 /dev/tty0,9600,Device1. The labels will be used in the logs output by serial-mitm

0.1.0 - 2022-06-15

Initial version!

Package Sidebar

Install

npm i serial-mitm

Weekly Downloads

0

Version

0.2.0

License

AGPL-3.0

Unpacked Size

18 kB

Total Files

6

Last publish

Collaborators

  • bytesnz