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.
github.com/beefe/react-native-popupwindow
Android used PopupWindow implementation of the iOS-style dialog box
options : must be not null
callback(err,action,button)
$ npm install --save react-native-popupwindow
$ react-native link react-native-popupwindow
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
ToastAndroid
} from 'react-native';
import MyPop from 'react-native-popupwindow';
let options = {
};
class PopupWindow extends Component {
center(){
options.style = 0;
MyPop.showPopupWindow(options,(err,action,button) =>{
if(err){
ToastAndroid.show(err,ToastAndroid.SHORT);
}else{
if(action === 'buttonClicked'){
if(button === 'positive'){
ToastAndroid.show('click ok',ToastAndroid.SHORT);
}else if(button === 'negative'){
ToastAndroid.show('click cancel',ToastAndroid.SHORT);
}
}
}
});
}
bottom(){
options.style = 1;
MyPop.showPopupWindow(options,(err,action,button) =>{
if(err){
ToastAndroid.show(err,ToastAndroid.SHORT);
}else{
if(action === 'buttonClicked'){
if(button === 'positive'){
ToastAndroid.show('click ok',ToastAndroid.SHORT);
}else if(button === 'negative'){
ToastAndroid.show('click cancel',ToastAndroid.SHORT);
}
}
}
});
}
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome} onPress={this.center}>
show in center
</Text>
<Text style={styles.welcome} onPress={this.bottom}>
show in bottom
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
});
AppRegistry.registerComponent('PopupWindow', () => PopupWindow);
FAQs
Unknown package
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.