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.
Guesses the user's regional parameters on-device, in a reliable way.
This library relies on the window
object of the user's browser. It guesses timezone, country,
native and preferred languages of the user and also stores currency code and calling code
related to its guess. As there is no %100 accurate way of detecting user's regional parameters,
this library tries its chance by combinating the outputs of window.Intl
and window.navigator
objects.
npm i regionist
or inject with script tag:
<script type="module" src="https://cdn.jsdelivr.net/npm/regionist@6/dist/index.js"></script>
The guess result is available as you import it.
import { regionist } from 'regionist'
// or const { regionist } = require('regionist') for cjs
// guess result:
regionist.toObject() === {
timezone: string | undefined,
country: string | undefined,
locale: RegionistLocale | undefined,
preferredLocale: RegionistLocale | undefined,
callingCode: number | undefined,
currencyCode: string | undefined
}
// assuming user's locale detected as tr_TR
regionist.findClosestLocale(['en-us', 'tr-tr']) === 'tr-tr'
regionist.findClosestLocale(['en_US', 'tr_TR']) === 'tr_TR'
regionist.formatLocaleText('en-us', 'iso') === 'en_US'
regionist.formatLocaleText('en_US', 'url') === 'en-us'
If you're interested in contributing, read the CONTRIBUTING.md first, please.
Version management of this repository done by releaser 🚀
Thanks for watching 🐬
FAQs
Guesses the user's regional parameters on-device, in a reliable way.
The npm package regionist receives a total of 102 weekly downloads. As such, regionist popularity was classified as not popular.
We found that regionist 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.