
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
c72-rfid-scanner
Advanced tools
$ npm install c72-rfid-scanner --save
$ react-native link c72-rfid-scanner
import C72RfidScanner from "c72-rfid-scanner";
const App = () => {
const [isReading, setIsReading] = React.useState();
const [powerState, setPowerState] = React.useState('');
const [tags, setTags] = React.useState([]);
const showAlert = (title, data) => {
Alert.alert(
title,
data,
[
{ text: 'OK', onPress: () => console.log('OK Pressed') },
],
{ cancelable: false },
);
}
const powerListener = (data) => {
//console.log(data);
setPowerState(data);
}
const tagListener = (data) => {
//rssi = data[1] epc = data[0] //Iam only interested in the EPC tag
setTags(tags => tags.concat(data[0]));
}
React.useEffect(() => {
const scanner = C72RFIDScanner;
scanner.initializeReader();
scanner.powerListener(powerListener);
scanner.tagListener(tagListener);
return () => scanner.deInitializeReader();
}, []);
const readPower = async () => {
try {
let result = await C72RFIDScanner.readPower();
showAlert('SUCCESS', `The result is ${result}`);
console.log(result);
} catch (error) {
showAlert('FAILED', error.message);
}
}
const scanSingleTag = async () => {
try {
let result = await C72RFIDScanner.readSingleTag();
showAlert('SUCCESS', `The result is ${result}`);
console.log(result);
} catch (error) {
showAlert('FAILED', error.message);
}
}
const startReading = () => {
C72RFIDScanner.startReadingTags(function success(message) {
setIsReading(message);
})
}
const stopReading = () => {
C72RFIDScanner.stopReadingTags(function success(message) {
setIsReading(false);
});
/**
* When I stop scanning I immediately return the tags in my state
* (You could render a view or do whatever you want with the data)
*/
console.log(tags);
}
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View>
<Text>{powerState}</Text>
</View>
<View style={{ marginVertical: 20 }}>
<Button style={{ margin: 10 }} onPress={() => readPower()} title='Read Power' />
</View>
<View style={{ marginVertical: 20 }}>
<Button style={{ margin: 10 }} onPress={() => scanSingleTag()} title='Read Single Tag' />
</View>
<View style={{ marginVertical: 20 }}>
<Button disabled={isReading} style={{ margin: 10 }} onPress={() => startReading()} title='Start Bulk Scan' />
</View>
<View style={{ marginVertical: 20 }}>
<Button disabled={!isReading} style={{ margin: 10 }} onPress={() => stopReading()} title='Stop Bulk Scan' />
</View>
</View>
);
}
export default App;
FAQs
Chainway C72 RFID UHF Barcode Scanner
The npm package c72-rfid-scanner receives a total of 37 weekly downloads. As such, c72-rfid-scanner popularity was classified as not popular.
We found that c72-rfid-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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.