Skip to content

PowerShellLibrary/Fake-UserAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fake-UserAgent

PowerShell Gallery License Build Status

PowerShell module for generating random User Agents.

How to use

$agents = Get-UserAgent

Output

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
  • Preprocess using 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

License

MIT License © Alan Płócieniak