Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
homekit-code
Advanced tools
Generate a pairing HomeKit QR code label or scannable tag to setup your HomeKit accessory.
Generate a pairing HomeKit QR code label or scannable tag to setup your HomeKit accessory
npx homekit-code qrcode --category=switch --pairingCode=84131633 --setupId=3QYT
Usage: homekit-code qrcode [options]
Generate a scannable HomeKit QR Code label
Options:
--version Show version number [boolean]
--help Show help [boolean]
-c, --category Category of the HomeKit accessory, required for generating a QR Code [choices: "airConditioner", "airport", "airPurifier", "appleTv", "bridge", "dehumidifier", "door", "doorLock", "fan", "faucet", "garage", "heater", "humidifier", "ipCamera", "lightbulb", "other", "outlet", "programmableSwitch", "rangeExtender", "securitySystem", "sensor", "showerHead", "speaker", "sprinkler", "switch", "targetController", "television", "thermostat", "videoDoorBell", "window", "windowCovering"] [default: "airConditioner"]
-f, --flag Flag how to connect to the HomeKit accessory. [required] [choices: "ble", "ip", "wac"] [default: "ip"]
-n, --name Name of the generated file [string] [default: "homekit-qrcode"]
-o, --output Format of the generated file [required] [choices: "svg", "png"] [default: "svg"]
-p, --pairingCode 8 digits pairing code [string] [required]
-s, --setupId Setup Id, required for generating a QR Code [string] [default: ""]
-z, --zoom Zoom factor when the output is an image [number] [default: 2]
Examples:
# Generate a QR code for a HomeKit switch
npx homekit-code qrcode --category=switch --pairingCode=84131633 --setupId=3QYT
# Generate a QR code for a HomeKit switch as switch.png with an image zoom factor of 10
npx homekit-code qrcode --category=switch --pairingCode=84131633 --setupId=3QYT --name=switch --output=png --zoom=10
# Generate a QR code for a Bluetooth Low Energy (BLE) HomeKit switch
npx homekit-code qrcode -c switch -f ble -p 84131633 -s 3QYT
npx homekit-code tag --pairingCode=84131633
Usage: homekit-code qrcode [options]
Generate a scannable HomeKit tag label
Options:
--version Show version number [boolean]
--help Show help [boolean]
-n, --name Name of the generated file [string] [default: "homekit-tag"]
-o, --output Format of the generated file [required] [choices: "svg", "png"] [default: "svg"]
-p, --pairingCode 8 digits pairing code [string] [required]
-z, --zoom Zoom factor when the output is an image [number] [default: 5]
Examples:
# Generate a scannable tag for a HomeKit accessory
npx homekit-code tag --pairingCode=84131633
# Generate a scannable tag for a HomeKit accessory as switch.png with an image zoom factor of 10
npx homekit-code tag --pairingCode=84131633 --name=switch --output=png --zoom=10
npm install
npm run start -- qrcode --category=switch --pairingCode=84131633 --setupId=3QYT
npm test
To build homekit-code
for production, run:
npm run build
Afterwards the executable code is available under ./lib/
.
cd lib
node index.js --category=switch --pairingCode=84131633 --setupId=3QYT
This command may be useful when obscure errors or issues are encountered. It removes and recreates dependencies of your project.
npm run repair
Fully automated version management and package publishing via semantic-release. It bumps the version according to conventional commits, publishes the package to npm and release a new version to GitHub.
Make sure that the secrets GITHUB_TOKEN
and NPM_TOKEN
are available in GitHub repository.
npm run release:ci
Make sure that the environment variables GITHUB_TOKEN
and NPM_TOKEN
are set or declared in .env
and a productive build was previously created via npm run build
.
npm run release
You can also test the release manually by running the following command:
npm run release:dry-run
The QR code is not the same as the pairing code, instead it consists of several parameters such as the category, a specific version and other parameters. This generated setup payload is the actual content of the QR code and can be generated with the HomeKit Accessory Simulator (HAS) as well.
Scan the QR code with a QR scanner of your choice. You should get a text starting with X-HM://....
. The next 9 characters are the combination of the different parameters like the pairing code and the category. The remaining characters are the setup id.
X-HM://0081YCYEP3QYT ◄── Scanned Setup Payload
X-HM:// 008YCYEP 3QYT
▲ ▲ ▲
│ │ └─── Setup ID
│ └── Combination of Parameters (first 9 characters)
└─ Starting Content
Simon Golms
npx simongolms
Give a ⭐️ if this project helped you!
Copyright © 2022 Simon Golms.
This project is MIT licensed.
FAQs
Generate a pairing HomeKit QR code label or scannable tag to setup your HomeKit accessory.
The npm package homekit-code receives a total of 11 weekly downloads. As such, homekit-code popularity was classified as not popular.
We found that homekit-code demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.