All posts by Don Matteo

Home at Zurich, System Engineer MCP by A-Enterprise GmbH. Memebr of UNBLOG Network. Author and Blogger to the Themes, Linux and Open Source. Tutorials for Windows, VMware, Synology, Fortinet.

Browser User Agent Switcher

How to change Browser User Agent use User Agent Switcher

What is a User Agent?

The user agent is a part of the HTTP header that is transmitted on an HTTP request. The user agent transmits information to the server, which usually includes the browser used and its version as well as the user’s operating system.

If you want to give the impression that the web request comes from a different browser than you actually use, this is possible. For example, to use the web server of a website to tell you which browser you are using to open the page. When developing web pages, this is a useful way to check the compatibility of the website for different browsers. For this purpose, all popular browsers have a built-in User Agent Switcher, so you can change the user agent without having to install an extension.

Websites identify browsers by user agent. Changing the user agent of a browser will tell the website you are visiting that it is a different browser. In this way, you can test websites whether they are designed for different browsers or even for different devices such as smartphones and tablets.

Google chrome

Chrome’s User Agent Switcher is part of the developer tools. To do this, open the Chrome Settings menu and go to More Tools and Developer Tools, or by pressing the Ctrl + Shift + I key combination on the keyboard.

The option in the Network conditions tab can be accessed via the Network tab and the three-pin menu on the left.

With User agent – Select automatically deactivate and select Custom, you can now enter any string for the user agent in the field, or select a user agent from the list.

Mozilla Firefox

For Mozilla Firefox, this option is on the about:config page.

To get to the page, enter about:config in the address bar of Firefox and press the Enter key. A warning will be displayed, clicking on I accept the risk! it goes on.

Here you enter general.useragent.override in the search box and press enter, then select String and right click on the plus+.

To the newly created entry general.useragent.override, insert a string for the user agent into the field as a value.

After entering a string value for the desired user agent, click on the hack and restart the browser.

The standard User Agent String of Mozilla Firefox 79 on Windows 10 is as follows:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Some examples of the User Agent String of different operating systems (operating system: User Agent String):

Windows XP IE 8.0 : Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Windows 7 IE 11.0 : Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Windows 8.1 Chrome: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
WinSrv 2012 IE 11 : Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
WinSrv 2016 Chrome: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
Windows 10 Firefox: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Windows 10 Chrome : Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
Windows 10 Edge 42: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134
Fedora 30 Firefox : Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Fedora 30 Chrome : Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
Ubuntu Bionic Lynx: Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.1.1b
CentOS (Core) Lynx: Lynx/2.8.8dev.15 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.0.1e-fips    
Android 8.0 Chrome: Mozilla/5.0 (Linux; Android 8.0.0; SM-G930F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.136 Mobile Safari/537.36
iPhone iOS 12.1 : Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605,1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/605.1
Linux Mint Firefox: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Linux Mint Chrome : Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
Raspberry Chromium: Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Raspbian Chromium/65.0.3325.181 Chrome/65.0.3325.181 Safari/537.36

To verify the user agent of his browser, this shows the query here.

How to Send Mail use cURL

Sending email over an SMTP gateway using cURL

cURL in combination with command-line options, sends an email to a recipient. Originally the name cURL meant “see URL” and was later reinterpreted to the current Backronym cURL.

The basic command for sending an email using cURL.

$ curl smtp://mail.server.com --mail-from sender@domain.com --mail-rcpt
receiver@domain.com --upload-file email.txt

Example: cURL using SMTP in the terminal emulator:

$ curl -v smtp://mail.server.com/email.com --mail-from don@email.com --mail-rcpt rosa@email.com --upload-file email.txt

The following is the output in the terminal:

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 10.12.15.13...
* TCP_NODELAY set
* Connected to mail.server.com (10.12.15.13) port 25 (#0)
< 220 mail.server.com ESMTP
> EHLO email.com
< 250-mail.server.com
< 250-PIPELINING
< 250-SIZE 22000000
< 250-ETRN
< 250-ENHANCEDSTATUSCODES
< 250-8BITMIME
< 250 DSN
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0> MAIL FROM:<don@email.com> SIZE=355
< 250 2.1.0 Ok
> RCPT TO:<rosa@email.com>
< 250 2.1.5 Ok
> DATA
< 354 End data with <CR><LF>.<CR><LF>
} [355 bytes data]
* We are completely uploaded and fine
< 250 2.0.0 Ok: queued as B744B28008
100   355    0     0  100   355      0    355  0:00:01 --:--:--  0:00:01  1334
* Connection #0 to host mail.server.com left intact

Using -v parameter to generates verbose output.

The file email.txt is uploaded and sent by cURL to the SMTP relay.

From: Don <don@email.com>
To: Rosa <rosa@email.com>
Subject: This is an example with cURL SMTP
Date: Sam, Jan 19, 2019 12:50:16 PM

Hello Rosa,
Welcome to cURL email, today is a beautiful day.

The content of email.txt take From, To, Subject, Date as data fields that serves the Simple Mail Transfer Protocol.

  The Mail Transfer Agent (MTA) must be configured to accept mail from the host that uses cURL on it, if it is not an MTA itself, a directive must be configured with smtpd_sender_restrictions, e.g. smtpd_client_restrictions.