
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
cordova-zebra-scanner
Advanced tools
Cordova plugin to interface with Zebra barcode scanners (on Android)
This plugin provides a (reasonably) easy-to-use interface for the following supported Zebra USB barcode scanners:
• PL3307
• DS457 (Tested)
• DS4308
• LS2208
• DS6878 and Presentation Cradle
• MP6210 (CSS + Scale) + EAS (Sensormatic).
Bluetooth support is possible, but not implemented. Theoretically, that would add support for the following models:
• CS4070 (in Bluetooth SSI Profile mode)
• LI4278 (in SSI Host Server mode or Cradle Host mode by scanning pairing bar code)
• DS6878 (in SSI Host Server mode or Cradle Host mode by scanning pairing bar code)
• RFD8500 (in default mode)
• DS3678 (In SSI BT Classic mode)
• LI3678 (In SSI BT Classic mode).
A sample Ionic implementation of this plugin can be found here.
This plugin is implemented in /src/pages/home/
cordova plugin add cordova-zebra-scanner
./plugins/com.michaelmay.cordova.plugin.barcodescanner
in your Cordova-based project.The plugin provides only two methods for you to interface with.
Used to listen and react to scanner events. Provide a callback function that will handle the different scanner events you want to react to. An Object is passed to the callback.
This single function is shared in the Java code of the Cordova plugin, so make sure you listen to all the events you want to react to. Subsequent calls to this method will erase previous listeners on the native side.
{
eventType: 'barcodeEvent' | 'scannerPluggedIn' | 'scannerUnplugged' | 'scannerConnected' | 'scannerDisconnected',
payload: (barcodeEvent only) {
{
scannerId: <number>,
barcodeType: <string>,
barcodeData: <string>
}
}
}
cordova.plugins.barcodescanner.attachHandlers((ev) => {
switch(ev.eventType) {
case 'barcodeEvent':
// Got a barcode of some sort
break;
case 'scannerPluggedIn':
// Scanner physically plugged in.
break;
case 'scannerUnplugged':
// Scanner physically unplugged.
break;
case 'scannerConnected':
// Scanner is available for use.
break;
case 'scannerDisconnected':
// Scanner is not available or initialized.
break;
}
});
Used to manage scanner connection state. This must be called to initialize scanning functionality. Provide a callback function to handle the responses from the native side. An Object is passed to the callback.
After calling the function, you will receive one of two responses.
If you receive the following response, you're set to go:
{
status: 'paired',
message: <string>
}
If you don't you'll see a response like this:
{
status: 'pairingRequired',
connectionBarcode: <base64 encoded jpeg>
}
Display the barcode somewhere on the screen, and scan it with your scanner to pair the device.
cordova.plugins.barcodescanner.connectToScanner((result) => {
switch(result.status) {
case: 'pairingRequired':
// Handle barcode display. Pairing needed before scanning will work.
break;
case: 'paired':
// Ready to scan.
break;
}
});
FAQs
Cordova plugin to interface with Zebra barcode scanners (on Android)
The npm package cordova-zebra-scanner receives a total of 2 weekly downloads. As such, cordova-zebra-scanner popularity was classified as not popular.
We found that cordova-zebra-scanner 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.