Are Browser agents injected on their own or do we need to set this manually?

bambinou

Client
Регистрация
22.08.2011
Сообщения
434
Благодарностей
21
Баллы
18
Hello,

Are Browser agents injected on their own(form the profile) or do we need to set this manually?


Thanks
 

lederer

Client
Регистрация
13.04.2013
Сообщения
169
Благодарностей
84
Баллы
28
They are set automatically at each new start of the project, but you can also set them through profile parameters using actions
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
I send it manualy on every project.
Sometimes they show ghost instances on ZP but devs says this is because I've changed user agent manualy.

A C# code to do it:
Код:
string tp = instance.BrowserType.ToString().ToLower();
if (tp.Equals("chrome")){
    tp = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36";
}
else{
    tp = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0";
}

project.Profile.UserAgent = tp;
project.Profile.UserAgentAppVersion = tp;
project.Profile.UserAgentLanguage = "pt-BR"; //our region
project.Profile.UserAgentBrowserLanguage = "pt-BR"; //our region
project.Profile.Country = "Brazil"; //our region
project.Profile.Town = "Rio de Janeiro"; //our region
project.Profile.AcceptLanguage = "pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3"; //our region
project.Profile.AcceptEncoding = "gzip, deflate, br"; //our region
 

bambinou

Client
Регистрация
22.08.2011
Сообщения
434
Благодарностей
21
Баллы
18
Interresting....Thanks for the reply and the code.
 

morpheus93

Client
Регистрация
25.01.2012
Сообщения
1 038
Благодарностей
237
Баллы
63
I send it manualy on every project.
Sometimes they show ghost instances on ZP but devs says this is because I've changed user agent manualy.

A C# code to do it:
Код:
string tp = instance.BrowserType.ToString().ToLower();
if (tp.Equals("chrome")){
    tp = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36";
}
else{
    tp = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0";
}

project.Profile.UserAgent = tp;
project.Profile.UserAgentAppVersion = tp;
project.Profile.UserAgentLanguage = "pt-BR"; //our region
project.Profile.UserAgentBrowserLanguage = "pt-BR"; //our region
project.Profile.Country = "Brazil"; //our region
project.Profile.Town = "Rio de Janeiro"; //our region
project.Profile.AcceptLanguage = "pt-BR,pt;q=0.8,en-US;q=0.5,en;q=0.3"; //our region
project.Profile.AcceptEncoding = "gzip, deflate, br"; //our region
May I ask why you set it manually? Does it look more legit this way?

Btw I also have "ghost instances" and I never set the user agent or something related manually.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)