
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
react-coinhive
Advanced tools
Mine cryptocurrency in your browser. This uses Coin-Hive to mine Monero (XMR).
npm install --save react-coinhive
import React from 'react';
import CoinHive from 'react-coinhive';
export default MyClass extends React.Component {
render() {
return (
<CoinHive
userName="Maya"
siteKey="caP8U8pZXH6n0f53eV3fdpwOvpmTAD3C"
autoThreads={false}
threads={2}
src={CoinHive.src.authedmine}
onInit={miner => setInterval(
() => console.log(CoinHive.getMinerData(miner))
, 1000
)}
/>
)
}
}
siteKey
: Your Coin-Hive Site Key.
userName
: If used, the miner will be created with CoinHive.User(siteKey, userName)
. By default the miner is created with CoinHive.Anonymous(siteKey)
.
src
: Source url of the js script minier. Requires a string. Default is CoinHiveClient.src.coinhive
('https://coinhive.com/lib/coinhive.min.js')
Available default values :
CoinHiveClient.src = {
coinhive: 'https://coinhive.com/lib/coinhive.min.js',
authedmine : 'https://authedmine.com/lib/authedmine.min.js',
};
threads
: The number of threads the miner should start with. Default is 2
.
throttle
: The fraction of time that threads should be idle. Default is 0
.
onInit
: A function that takes the miner
instance as argument. It's called when the miner is created.
onStart
: A function that takes the miner
instance as argument. It's called every time the miner is started.
onStop
: A function that takes the miner
instance as argument. It's called every time the miner is stopped.
I have nothing to do with coin-hive.com
.
FAQs
react-coinhive React component
The npm package react-coinhive receives a total of 7 weekly downloads. As such, react-coinhive popularity was classified as not popular.
We found that react-coinhive 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
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.