> For the complete documentation index, see [llms.txt](https://ed4m4s.blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ed4m4s.blog/password-attacks/john-the-ripper.md).

# John The Ripper

**Basic Usage**

```
john hashfile.txt
john --wordlist=/path/to/your/wordlist.txt hashfile.txt
john --format=ntlm hashfile.txt
```

**ssh2john**

```
 Encrypted SSH private key found? Crack it with ssh2john
 
 1) ssh2john id_rsa > crack.txt
 2) john --wordlist=/usr/share/wordlists/rockyou.txt crack.txt
 3) openssl rsa -in id_rsa
    Enter pass phrase for id_rsa: PASSWORD_HERE
```

**gpg2john**

```
Encrypted PGP file found? Crack it with gpg2john

gpg --import name.asc 
gpg2john name.asc > hash
john --format=gpg --wordlist=/usr/share/wordlists/rockyou.txt hash 
gpg --decrypt somecredentials.pgp        # Enter the password found above. 
```

**zip2john**

```
Encrypted ZIP file found? Crack it with zip2john

1) zip2john somezipname.zip > zipname.hash
2) john zipname.hash 
3) 7z e somezipname.zip
   Enter password (will not be echoed): PASSWORD_HERE
```

#### keepass2john

```
keepass2john some_pass_key.kdbx
```

#### rar2john

```
rar2john SOME_FILE.rar > crack_this
john --wordlist=/usr/share/wordlists/rockyou.txt crack_this
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://ed4m4s.blog/password-attacks/john-the-ripper.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
