https://github.com/powershelllibrary/fake-useragent
https://github.com/powershelllibrary/fake-useragent
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/powershelllibrary/fake-useragent
- Owner: PowerShellLibrary
- License: mit
- Created: 2025-01-23T21:36:09.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-01-25T19:34:06.000Z (12 months ago)
- Last Synced: 2025-02-03T09:56:55.762Z (12 months ago)
- Language: PowerShell
- Size: 451 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Fake-UserAgent
[](https://www.powershellgallery.com/packages/Fake-UserAgent)
[](LICENSE)
[](https://github.com/PowerShellLibrary/Fake-UserAgent/actions/workflows/test.yml)
PowerShell module for generating random **User Agents**.
## How to use
```powershell
$agents = Get-UserAgent
```
Output
```text
ua : Mozilla/5.0 (iPhone; CPU iPhone OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1.1 Mobile/15E148 Safari/604.1
percent : 0.0969801619581542
type : mobile
device_brand : Apple
browser : Mobile Safari
browser_version : 18.1.1.0
browser_version_major_minor : 18.1
os : iOS
os_version : 18.1.1.0
platform : iPhone
```
## How it works
Module comes with bundled `user-agents.dat` file which contains different User Agent entries.
The process of creating it:
- Download the version of **user-agents.json** from [**user-agents**](https://github.com/intoli/user-agents/)
- Preprocess using [**uap-csharp**](https://github.com/ua-parser/uap-csharp/)
- Serialize into an XML-based representation (Common Language Infrastructure (CLI)) of all the objects
- Optimize for smaller size
- Store as a file `user-agents.dat`
## Acknowledgements
This project makes use of the following project
- [**user-agents**](https://github.com/intoli/user-agents/) by [**intoli**](https://github.com/intoli)
*A JavaScript library for generating random user agents with data that's updated daily.*
- [**uap-csharp**](https://github.com/ua-parser/uap-csharp/) by [**ua-parser**](https://github.com/ua-parser)
*C# implementation of ua-parser*
## License
[MIT License](LICENSE.md) © Alan Płócieniak