> For the complete documentation index, see [llms.txt](https://thmflags.gitbook.io/thm-walkthroughs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thmflags.gitbook.io/thm-walkthroughs/difficulty-info/linux-fundamentals/linux-fundamentals-part-3/task-4-general-useful-utilities.md).

# Task 4 - General/Useful Utilities

## Task 4 General/Useful Utilities

### Ensure you are connected to the deployed instance (MACHINE\_IP)

{% hint style="success" %}
No answer needed
{% endhint %}

### Now, use Python 3's "HTTPServer" module to start a web server in the home directory of the "tryhackme" user on the deployed instance.

{% hint style="warning" %}
**HINT:** python3 -m http.server
{% endhint %}

{% hint style="success" %}
No answer needed
{% endhint %}

### Download the file <mark style="color:blue;background-color:blue;"><http://MACHINE\\_IP:8000/.flag.txt></mark> onto the TryHackMe AttackBox *(or your kali box)*. What are the contents?

{% hint style="warning" %}
**HINT:** Use wget! It's a hidden file so don't forget the period in .flag.txt when downloading and catting
{% endhint %}

<details>

<summary>Reveal Flag <span data-gb-custom-inline data-tag="emoji" data-code="1f6a9">🚩</span></summary>

:triangular\_flag\_on\_post:`THM{WGET_WEBSERVER}`

</details>

### Create and download files to further apply your learning -- see how you can read the documentation on Python3's "HTTPServer" module.&#x20;

Use Ctrl + C to stop the Python3 HTTPServer module once you are finished.

{% hint style="warning" %}
**HINT:** <https://docs.python.org/3/library/http.server.html>
{% endhint %}

{% hint style="success" %}
No answer needed
{% endhint %}
