Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: user_agent: random #368

Open
spirillen opened this issue Jun 23, 2024 · 4 comments
Open

FEATURE: user_agent: random #368

spirillen opened this issue Jun 23, 2024 · 4 comments

Comments

@spirillen
Copy link
Contributor

spirillen commented Jun 23, 2024

Description

As I'm working my way through the new PyFunceble.yaml I stumbled on the fact we are hard coding the use of browser and OS, Somehow this just seems wrong, as we know, then the big5 and their wannabees, are logging the IP/Browser/OS etc, and sharing these data, to fetch bots and gives us FP-responses on http codes, as we receives false 4xx, 5xx HTTPS codes.

Possible Solution

One of two

  1. Randomize browser and OS per -n records (Optimal)
  2. Randomize browser and OS per test starts

Considered Alternative

Manual labor, bad, the system is MY slave, not the other way around.

Additional context

UPDATE: typos

@funilrys
Copy link
Owner

Yeah, but what does random means for you?

Our user_agents are getting rotated every week - when not every day... And we choose a random one from one of the latest / most used ones:

if isinstance(result, (list, tuple)):
return secrets.choice(result)

@spirillen
Copy link
Contributor Author

spirillen commented Jun 23, 2024

And we choose a random one from one of the latest / most used ones:

I see tree questions here

  1. Selection among browser + OS
  2. How to control
  3. You(me) ask because

  1. Automatically rotate among all the available ones from the list (forgot the url), but you probably remember it. to the list of options
  2. by a switch of Random vs chrome,Linux in the pyf.owerwrite.yml
  3. Because as of now, 1 I didn't know it was rotated by default, 2. in pyf.owerwrite.yml. you can only set a firm value

@spirillen
Copy link
Contributor Author

Come to think of... and YES it is a though only, can you spoof the mac addresses used for querying?

IF == True

Would it be an idea then to periodically with hourly randomness generate a set of "Clients, running its own MAC + Browser + OS"?
... IF == TRUE
Could this help making it looks like a random number of users on the same network vs one client from the same network?

@funilrys
Copy link
Owner

Well, look here under the @modern datasets. What you give PyFunceble is the keys to a list of user-agents.

I'll have to think of a way to implement randomness. That won't be the default though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants