pwnlib.useragents — A database of useragent strings

Database of >22,000 user agent strings

pwnlib.useragents.getall() → str set[source]

Get all the user agents that we know about.

Returns:A set of user agent strings.


>>> 'libcurl-agent/1.0' in getall()
>>> 'wget' in getall()
pwnlib.useragents.random() → str[source]

Get a random user agent string.

Returns:A random user agent string selected from getall().
>>> import random as randommod
>>> randommod.seed(1)
>>> random()
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; FunWebProducts-MyTotalSearch; iebar)'