# Shell Fu - Oneliners

## URI analysis - JavaScript Enumeration

```
cat file.js | grep -aoP "(?<=(\"|\'|\`))\/[a-zA-Z0-9_?&=\/\-\#\.]*(?=(\"|\'|\`))" | sort -u
```

## cURL - NTLM authentication

```
curl -k --ntlm -u username:password URL
```

With an authentication within the domain (double slash for shell as escape sequence)

```
curl -k --ntlm -u DOMAIN\\username:password URL
```

A silent (-s,--silent) version with HTTP status code reporting

```
curl -s -o /dev/null -w \"%{http_code}\" -k --ntlm -u -u username:password URL
```

## Join - User\_Pass Wordlist Compilation

A replacement of a first ":" character is needed anyway, regex replacement needed "\n:", "\n"

```
join -j 2 -t $':' users.txt pass10k.txt
```


---

# 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://hackerlab.gitbook.io/wiki.hackerlab.cz/web-pentesting/shell-fu-oneliners.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.
