Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
baffle-react
Advanced tools
Baffle as a React component
npm install --save baffle-react
yarn add baffle-react
import React, { Component } from "react";
import Baffle from "baffle-react";
export default class Demo extends Component {
state = {
update: true,
obfuscate: true
};
render() {
const { update, obfuscate } = this.state;
return (
<div>
<button onClick={() => this.setState({ update: !update })}>
{update ? "Pause" : "Start"}
</button>
<button onClick={() => this.setState({ obfuscate: !obfuscate })}>
{obfuscate ? "Reveal" : "Obfuscate"}
</button>
<Baffle
speed={50}
characters="!@#$%^&*"
exclude={[" ", "!"]}
obfuscate={obfuscate}
update={update}
revealDuration={1000}
revealDelay={0}
>
!!!foo bar baz!!!
</Baffle>
</div>
);
}
}
prop | type | default | description |
---|---|---|---|
children | string | Text to be obfuscated | |
characters | string|array | "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz~!@#$%^&*()-+=[]{}|;:,./<>?" | Character set to be used for obfuscation. See baffle.js options.characters |
exclude | array | [" "] | Character set to be ignored during obfuscation. See baffle.js options.exclude |
speed | number | 50 | Frequency (in milliseconds) at which baffle re-obfuscates text while props.update is true . See baffle.js options.speed |
obfuscate | bool | true | When true , text is obfuscated. |
update | bool | true | While true , obfuscated text updates every props.speed milliseconds. |
revealDuration | number | 1000 | When props.obfuscate changes from true to false and props.update is true , the duration in milliseconds over which text is revealed. See baffle.js reveal() |
revealDelay | number | 0 | When props.obfuscate changes from true to false and props.update is true , the delay before revealDuration begins. See baffle.js reveal() |
FAQs
Text obfuscation via Baffle, as a React component
We found that baffle-react 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 malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.