Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
rn-detector
Advanced tools
a simply and easy to use screenshot detector for react native
yarn
yarn add react-native-detector
npm
npm install react-native-detector
cd ios && pod install
for Android you need to have access for READ_EXTERNAL_STORAGE
to detect screenshots by user to do that you just need to add this line in AndroidManifest.xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
and get user permission
import { PermissionsAndroid } from 'react-native';
//...
const requestPermission = async () => {
await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE,
{
title: 'Get Read External Storage Access',
message: 'get read external storage access for detecting screenshots',
buttonNeutral: 'Ask Me Later',
buttonNegative: 'Cancel',
buttonPositive: 'OK',
}
);
};
import {
addScreenshotListener,
removeScreenshotListener,
} from 'react-native-detector';
// ...
React.useEffect(() => {
const userDidScreenshot = () => {
console.log('User took screenshot');
};
const unsubscribe = addScreenshotListener(userDidScreenshot);
return () => {
unsubscribe();
};
}, []);
Status | Goal |
---|---|
✅ | iOS version of screenshot detector |
✅ (Thanks to @mhssn95) | Android version of screenshot detector |
🚧 | Screen recording detecting |
🚧 | Calls detector |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
a screenshot detector for react native
The npm package rn-detector receives a total of 0 weekly downloads. As such, rn-detector popularity was classified as not popular.
We found that rn-detector 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.