# Task 12 - Searching for Scripts

## Task 12 <mark style="color:orange;background-color:orange;">NSE Scripts</mark> Searching for Scripts

### Search for "smb" scripts in the <mark style="color:red;background-color:red;">/usr/share/nmap/scripts/</mark> directory using either of the demonstrated methods. What is the filename of the script which determines the underlying OS of the SMB server?

<details>

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

:triangular\_flag\_on\_post:`smb-os-discovery.nse`

</details>

### Read through this script. What does it depend on?

{% code title="smb-os-discovery.nse line:81" %}

```lua
dependencies = {"smb-brute"}
```

{% endcode %}

{% hint style="warning" %}
**HINT:** Look for `dependencies = {}` in the Lua script.
{% endhint %}

<details>

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

:triangular\_flag\_on\_post:`smb-brute`

</details>


---

# 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://thmflags.gitbook.io/thm-walkthroughs/difficulty-easy/nmap/task-12-searching-for-scripts.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.
