
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@smarterservices/vps-proctor-socket-toolkit
Advanced tools
A toolkit containing functions that help with standard smartersockets tasks
##Getting Started
npm install @smarterservices/vps-proctor-socket-toolkit
###Constructor:
var toolkit = require('@smarterservices/vps-proctor-socket-toolkit');
var kit = new toolkit({socket:socket}};
Note socket in config is where you pass your entire smarterservices socket
##Methods
###muteVideo
description: Used to publish to a listener telling the student that your video is muted.
Arguments
topic
: topic of the listenermute
: Bool showing mute value.
Example
kit.muteVideo(topic,true);
###changeState
description: Used to publish to a listener telling them to change state.
Arguments
topic
: topic of the listenerstate
: The state to change to.
exam-view
conversation-view
Example
kit.changeState(topic,state);
###examStatus
Invoked when you need to actually change the status of the exam.
Arguments
topic
: topic of the listenerstatus
: The status to change the exam to.
blocked
active
Example
kit.examStatus(topic,status);
When invoked will send paste: true with type pastText
Arguments
topic
: topic of the listenerExample
kit.pasteText(topic);
When invoked will send boolean to pause or unpause student proctor session
Arguments
topic
: topic of the listenerblockExam
: boolean to pause exam or not.Example
kit.blockExam(topic,blockExam);
Invoked to shift student applicaiton to fullscreen or not
Arguments
topic
: topic of the listenerfull
: boolean to make fullscreen or noExample
kit.fullScreen(topic,full);
description: Send video upload metadata over socket
Arguments
topic
: topic of the listeneruserId
: the users idsessionId
: the session id for that videovideoType
: the video type. I.e webcam,screenvideoTimestamp
: the timestamp from the videovideoId
: the video idspeed
: the speed of the uploadsize
: the size of the uploadtime
: the time the upload tookExample
kit.s3Speed(topic,userId,sessionId,videoType,videoTimestamp,videoId,speed,size,time);
socket.on('message',function(topic,res){})
description: generic listener for anything not expecting a res from .register method.
Example:
socket.on('message',function(topic,res) {
console.log(topic,res
}
socket.on('connect',function(){})
description: called when connected. If you need to do something after connected put inside this event. Is called again on reconnect so do NOT nest other listeners inside
Example:
socket.on('connect',function(){
console.log('now connected');
};
**socket.on('reconnect',function(){})**
description:If reconnect happens.
Example:
socket.on('reconnect',function(){
console.log('now reconnected');
};
**socket.on('error',function(error){})**
description: happens if error happens during connect or publish.
Example:
socket.on('error',function(error){
console.log(error);
};
**socket.on('disconnected',function(){})**
description: happens if state is switched to offline from online.
Example:
socket.on('disconnected',function(){
console.log('now disconnected');
};
**socket.on('reconnectFailed',function(){})**
description: happens if reconnect fails(still offline).
Example:
socket.on('reconnectFailed',function(){
console.log('now offline');
};
**socket.on('close',function(){})**
description: happens if socket connection is closed.
Example:
socket.on('close',function(){
console.log('now closed socket');
};
###Disconnect Logic:
The socket will take between 5 and 15 seconds to register that the connection has dropped and emit the disconnect callback. When a client first disconnects their disconnect time is set to NOW - 15 seconds.From there their client will try to reconnect every second(all socket events will be thrown into a queue).
Once reconnected will send reconnect message over all sessions they can publish to, empty their socket queue and emit a connect call from their socket.
###All events after this only available with state management class below:socket.on('client.connected',function(obj){})
description: Happens if a new client connects to your topic
return: OBJECT {topic:topic,client:client_id}
Example:
socket.on('client.connected',function(res){
console.log(res.topic,res.client);
};
FAQs
toolkit of functions for smartersockets
We found that @smarterservices/vps-proctor-socket-toolkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.