
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.
discover-path
Advanced tools
Check for the existence of a path in a case-sensitive manner and, if not found, suggest where it might be at
Check for the existence of a path in a case-sensitive manner and, if not found, suggest where it might be at.
Note that this is a slow operation (recursively listing directory contents), and should only be used in cases where that's fine (CLI tools in the case of errors, for instance).
$ npm install discover-path
import {discoverPathSync} from 'discover-path'
const expectedPath = '/Users/Rexxars/webdev/discover-Path'
const actualPath = discoverPathSync(expectedPath)
// If a "direct" match is found (1:1, or on case-changes with only one option:)
console.log(actualPath) // /Users/rexxars/webdev/discover-path
suggestions
property on the error.import {discoverPathSync} from 'discover-path'
try {
const expectedPath = '/Users/rexxars/webdev/Discover-Path'
const actualPath = discoverPathSync(expectedPath)
} catch (err) {
console.log(err.code) // 'ENOENT'
console.log(err.path) // '/Users/rexxars/webdev/Discover-Path'
console.log(err.suggestions)
/*
[
'/Users/rexxars/webdev/discover-path',
'/Users/rexxars/webdev/discover-Path'
]
*/
console.log(err.message)
/*
Cannot find path '/Users/Rexxars/webdev/Discover-Path'
Did you mean:
- /Users/rexxars/webdev/discover-path
- /Users/rexxars/webdev/discover-Path
*/
}
MIT © Espen Hovlandsdal
FAQs
Check for the existence of a path in a case-sensitive manner and, if not found, suggest where it might be at
We found that discover-path 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
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.