Home > ubuntu > What is my user agent?

What is my user agent?

Figure out the user agent of your browser. But! You are not allowed to visit http://whatsmyuseragent.com/ or any similar service :)

It’s time to discover netcat, the “Swiss-army knife for TCP/IP”. In a terminal launch nc and start listening on a port:

$ nc -l 8080

Visit http://localhost:8080 . Switch back to the terminal and you will see something similar:

GET / HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Categories: ubuntu Tags: ,
  1. February 9, 2014 at 13:41

    Couldn’t get it to work, until I found out that you need a -p as well, as in “nc -l -p 8080”

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: