npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bt-serial-mitm

v0.0.4

Published

NodeJS Library to perform a MITM attack for bluetooth serial port devices

Downloads

4

Readme

node-bt-serial-mitm

This library was created to view the communication between a bluetooth device and an app on my smartphone connected to it. I am not responsible for any damage caused by malicious use of this library!

NodeJS Library to perform a MITM attack for bluetooth serial port devices

Dependencies

bluetooth-serial-port

Introduction

Bluetooth serial communication usually consists of a host and at least one slave.

For example, most car mechanics will use a device called an OBD reader. This allows the mechanic to see more info about the car's performance and view codes causing the "Check Engine Light". A lot of OBD readers take advantage of bluetooth, which means the mechanic can use their smartphone or tablet to connect to the car.

Traditionally, if you wanted to understand the data that is being sent between the smartphone and the OBD reader, you would have to learn about the ELM327 protocol and go through many, many pages of documentation. But this library will allow you to see the communication in real-time.

This library uses the term "slave" and "host". In the above scenario, your smartphone would be the "slave". And your bluetooth device would be the "host".

Usage

Construct a new BluetoothMITM object and connect to your host (aka, your bluetooth device). It's a good idea to wait for this script to connect to your host first (hence the await keyword).

mitm = new (require('bt-serial-mitm')).BluetoothMITM
await mitm.connect('01:23:45:67:89:AB')

Or you can use the "autoconnect" method to scan for bluetooth devices that match a certain name.

await mitm.autoconnect('obd')

Start the server

mitm.listen()

On your actual client (ex: smartphone), instead of connecting to the actual bluetooth device, connect to the computer that this script is running on. You may have to pair your phone with the computer before connecting to it.

After your smartphone is connected to the computer, you should start seeing logs in the terminal that look like this.

slave: ATZ\r\n
host : OK\r\n

For example, if your smartphone is connecting to an OBD reader in your car, then your smartphone is the slave and your OBD reader is the host.

Events

  • server.newclient

    Occurs when a new slave device connects to your script.