Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
baffle-react
Advanced tools
Readme
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
The npm package baffle-react receives a total of 16 weekly downloads. As such, baffle-react popularity was classified as not popular.
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.
Security News
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.