Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
useragent-generator
Advanced tools
Generate user-agent strings for popular browsers
Easily generate accurate user-agent strings for popular browsers.
npm install useragent-generator
const ua = require('useragent-generator')
// ...
Chrome
ua.chrome(options)
ua.chrome.androidPhone(options)
ua.chrome.androidTablet(options)
ua.chrome.iOS(options)
ua.chrome.androidWebview(options)
ua.chrome.chromecast(options)
Chromium
Firefox
ua.firefox(options)
ua.firefox.androidPhone(options)
ua.firefox.androidTablet(options)
ua.firefox.iOS(options)
Safari
Internet Explorer
Microsoft Edge
Search Engines
ua.chrome(options)
ua.chrome(60)
ua.chrome('61.0.0')
ua.chrome({ version: '61.0.0', os: 'Windows NT 6.3' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
options.os | string | Windows NT 6.4 (Windows 10) |
ua.chrome.androidPhone(options)
/ ua.chrome.androidTablet(options)
ua.chrome.androidPhone(60)
ua.chrome.androidPhone('61.0.0')
ua.chrome.androidPhone({ version: '61.0.0', androidVersion: '6.2.1', device: 'Nexus 6' })
ua.chrome.androidTablet(60)
ua.chrome.androidTablet('61.0.0')
ua.chrome.androidTablet({ version: '61.0.0', androidVersion: '6.2.1', device: 'SM-T210' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
options.androidVersion | string | 7.0.0 (Nougat) |
options.device | string | Pixel (Phone) / Pixel C (Tablet) |
ua.chrome.iOS(options)
ua.chrome.iOS(10) // iOS version
ua.chrome.iOS('10.0.1') // iOS version
ua.chrome.iOS({ iOSVersion: '10.0.1', iOSVersion: '62.1.0', device: 'iPad' })
Param | Type | Default Value |
---|---|---|
options.iOSVersion | string | — |
options.chromeVersion | string | 60.0.0.0 |
options.device | string | iPhone |
ua.chrome.androidWebview(options)
ua.chrome.androidWebview(4) // Android OS version
ua.chrome.androidWebview('4.4') // Android OS version
ua.chrome.androidWebview({ androidVersion: '5.0.0', chromeVersion: '60.1.0', device: 'Nexus 6' })
Param | Type | Default Value |
---|---|---|
options.androidVersion | string | — |
options.chromeVersion | string | 60.0.0.0 (applicable only for Android 4.4 (Kitkat) and above) |
options.device | string | Pixel |
ua.chrome.chromecast(options)
ua.chrome.chromecast(62)
ua.chrome.chromecast('62.1.0') // Android OS version
ua.chrome.chromecast({ version: '62.1.0' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
ua.chromium(options)
Same as ua.chrome
ua.firefox(options)
ua.firefox(52)
ua.firefox('52.4')
ua.firefox({ version: '53.4.1', os: 'Windows NT 6.3' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
options.os | string | Windows NT 6.4 (Windows 10) |
ua.firefox.androidPhone(options)
/ ua.firefox.androidTablet(options)
ua.firefox.androidPhone(52)
ua.firefox.androidPhone('52.4')
ua.firefox.androidPhone({ version: '52.4.1', androidVersion: '6.2.1', device: 'Nexus 6' })
ua.chrome.androidTablet(60)
ua.chrome.androidTablet('61.0.0')
ua.chrome.androidTablet({ version: '52.4.1', androidVersion: '6.2.1', device: 'SM-T210' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
options.androidVersion | string | 7.0.0 (Nougat) |
options.device | string | Pixel (Phone) / Pixel C (Tablet) |
ua.firefox.iOS(options)
ua.firefox.iOS(10) // iOS version
ua.firefox.iOS('10.0.1') // iOS version
ua.firefox.iOS({ iOSVersion: '10.0.1', device: 'iPad' })
Param | Type | Default Value |
---|---|---|
options.iOSVersion | string | — |
options.device | string | iPhone |
ua.safari(options)
ua.safari(10)
ua.safari('10.1.0')
ua.safari({ version: '10.3.1', os: 'Macintosh; Intel Mac OS X 10_11' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
options.os | string | Macintosh; Intel Mac OS X 10_11 (Mac OS X El Capitan) |
ua.safari.iOS(options)
ua.safari.iOS(10) // iOS version
ua.safari.iOS('10.0.1') // iOS version
ua.safari.iOS({ iOSVersion: '10.0.1', safariVersion: '10.3.0', device: 'iPad' })
Param | Type | Default Value |
---|---|---|
options.iOSVersion | string | — |
options.safariVersion | string | (equal to iOSversion ) |
options.device | string | iPhone |
ua.safari.iOSWebview(options)
ua.safari.iOSWebview(10) // iOS version
ua.safari.iOSWebview('10.0.1') // iOS version
ua.safari.iOSWebview({ iOSVersion: '10.0.1', safariVersion: '10.3.0', device: 'iPad' })
Param | Type | Default Value |
---|---|---|
options.iOSVersion | string | — |
options.safariVersion | string | (equal to iOSversion ) |
options.device | string | iPhone |
ua.ie(options)
ua.ie(9)
ua.ie('9.0.1')
ua.ie({ version: '9.0.1', os: 'Windows NT 6.3' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
options.os | string | Windows NT 6.4 (Windows 10) |
ua.ie.windowsPhone(options)
ua.ie(9)
ua.ie('9.0.1')
ua.ie({ version: '9.0.1', os: 'Lumia 625' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
options.device | string | Lumia 630 |
ua.edge(options)
ua.edge(12)
ua.edge('12.0.1')
ua.edge({ version: '12.0.1', chromeVersion: '62.0.1', os: 'Windows NT 6.3' })
Param | Type | Default Value |
---|---|---|
options.version | string | — |
options.chromeVersion | string | 52.0.0.0 |
options.os | string | Windows NT 6.4 (Windows 10) |
ua.googleBot()
ua.bingBot()
ua.yahooBot()
ua.googleBot('2.0')
ua.bingBot('2.1')
ua.googleBot(options)
— GoogleBotParam | Type | Default Value |
---|---|---|
options.version | string (optional) | '2.1' |
ua.bingBot(options)
— BingBotParam | Type | Default Value |
---|---|---|
options.version | string (optional) | '2.0' |
ua.yahooBot()
— YahooBotFAQs
Generate user-agent strings for popular browsers
We found that useragent-generator 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.