
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Strings Comparing To Operations (OT model)
This package is similar to jsdiff, but generates OT-friendly operations. Can be useful for comparing strings in OT or CRDT data-transfer model. x30 faster then diff-match-patch and x625 faster than jsdiff in strings comparision!
yarn add scto
Text compare:
import { stringDiffToOps, applyOps } from 'scto'
const origin = 'Yet so far hath discretion fought'
const modifyed = 'Yet get far discretion fought!'
const operations = stringDiffToOps(origin, modifyed)
/*
operations [
{ type: 'replace', offset: 4, data: 'get', shift: 2 },
{ type: 'drop', offset: 12, shift: 5 },
{ type: 'insert', offset: 29, data: '!' }
]
*/
const applyed = applyOps(origin, operations) // Yet get far discretion fought!
console.log(applyed === modifyed) // true
Array compare:
import { collateDiffToOps, applyOps } from 'scto'
const origin = ['foo', 'bar', 'baz']
const modifyed = ['abc', 'foo', 'baz']
const operations = collateDiffToOps(origin, modifyed)
/*
operations [
{ type: 'insert', offset: 0, data: ['abc'] },
{ type: 'drop', offset: 2, shift: 1 }
]
*/
const applyed = applyOps(origin, operations)
/* ['abc', 'foo', 'baz'] */
Replace:
export interface Replace {
type: 'replace'
offset: number
shift: number
data: Collate
}
Drop:
export interface Drop {
type: 'drop'
offset: number
shift: number
}
Insert:
export interface Insert {
type: 'insert'
offset: number
data: Collate
}
FAQs
Strings compare to OP model
The npm package scto receives a total of 0 weekly downloads. As such, scto popularity was classified as not popular.
We found that scto 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.