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.
ssvep-stimuli
Advanced tools
CSS and WebGL were adopted to implement four cross-platform Steady State Visually Evoked Potential (SSVEP) stimuli-generator libraries, whose stimuli are produced via constant-period and square wave approximation techniques, for use in a Brain-Computer Interface (BCI) context. These libraries are configured to run as spellers, yet can easily be altered to cater for a wide range of use cases.
More information about these libraries can be found in this peer reviewed publication by the same authors: Towards Accurate Browser-based SSVEP Stimuli Generation.
In alignment with existing documentation, it was found that CSS animations are more stable and performant than their WebGL counterparts.
There are 4 stimuli generators in this repository, CSS+Square Wave Approximation
, CSS+Constant Period
, WebGL+Square Wave Approximation
and WebGL+Constant Period
.
After importing the library, you can create any number of stimuli on the page using the following data-*
attributes:
data-frequency
: specifying the SSVEP stimulus frequencydata-light-color
: specifying the color of the SSVEP stimulus (N.B. data-dark-color
currently defaults to transparent
) in RGBA format (e.g. 1,1,1,1
for white)data-phase-shift
: specifying the phase shift (frames delay) for the SSVEP stimulusStimuli can be defined as follows:
<button data-frequency="6.67" data-dark-color="0,0,0,1" data-light-color="1,1,1,1" data-phase-shift="0">Content</button>
<button data-frequency="7" data-dark-color="0,0,0,1" data-light-color="1,1,1,1" data-phase-shift="0">Content</button>
<button data-frequency="8.57" data-dark-color="0,0,0,1" data-light-color="1,1,1,1" data-phase-shift="0">Content</button>
To begin stimuli generation, you must select your HTML elements and add to the manager
<script type="module">
import * as stimuli from "./src/index.js"
const elements = document.querySelectorAll('button')
// ----------- CSS Methods -----------
const manager = new stimuli.CSS('periodic', elements.length)
// const manager = new stimuli.CSS('approximation', elements.length)
// ----------- WebGL Methods -----------
// const canvas = document.body.querySelector('canvas')
// const manager = new stimuli.WebGL('periodic', elements.length, canvas)
// const manager = new stimuli.WebGL('approximation', elements.length, canvas)
elements.forEach(el => manager.set(el)) // Add Elements
manager.start() // Start Stimuli Generation
</script>
You can add more stimuli by passing one or more elements to the start()
method:
manager.start(document.getElementById('new_element'))
// manager.start(document.body.querySelectorAll('.other'))
This technique also allows you to selectively start a subset of elements.
You can cancel all ongoing stimuli generation by calling the stop()
method:
manager.stop()
Or stop a subset by passing one or more elements as the first argument:
manager.stop(document.getElementById('new_element'))
// manager.stop(document.body.querySelectorAll('.other'))
These libraries were developed by Alison Camilleri to fulfill part of the requirements for the award of a Master of Science in Computer Information Systems degree.
Department of Computer Information Systems, Faculty of ICT
Department of Systems & Control Engineering, Faculty of Engineering
Founding Partner at Brains@Play
FAQs
A library for generating SSVEP stimuli on the browser
The npm package ssvep-stimuli receives a total of 3 weekly downloads. As such, ssvep-stimuli popularity was classified as not popular.
We found that ssvep-stimuli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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’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.