# Git Happens

![](/files/-Mdn8gvYpGq74Il5sUKt)

## Scanning

Lets run scans to find open ports and services

![](/files/-Mdn9hq72ojnS0MsrkOI)

## Enumeration&#x20;

Lets check the webserver out.

![](/files/-Mdn9nv4O7ZYcR636TCI)

We have a login page. In the nmap scan we found the `/.git/` directory, lets check it out.

![](/files/-MdnA-SNlY0Xrau-LMA-)

We have a bunch of directories.

Now we can manually look at all the directories, or we can use a tool called `GitTools`. Lets download it.

![](/files/-MdnAq45fQ9pBor2Q4e7)

Now lets download the directories onto out machine and call it `clone`.

![](/files/-MdnBK1m-_TnzXmOeSgH)

Now we can see all the directories on our machine

![](/files/-MdnBYGRw2z48Cicmn_5)

Here, lets look at the logs as they are the most interesting

![](/files/-MdnC6k30lJaU8KPZyfr)

Looking at all of them , the highlighted one is the most interesting as it might show us interesting information about the login page. Lets look at it in more detail

![](/files/-MdnDG2vcGdc1WeQwvpv)

Scrolling to the end of the file, we find the flag.

![](/files/-MdnDClsfvP0nDRaHFqR)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://writeups.adityadindi.com/tryhackme/untitled/git-happens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
