# LUKS script for dictionary attack?

## bastibasti

I am f'd... I forgot my passwordfor my new harddrive. However I know all compinations of words that could be used (I spell them differently as normal)

I would like to build a dictionary and let it check the combinations automatically. Is there such script?

----------

## Hu

Untested:

```
while read p; do echo $p | cryptsetup -d - luksOpen /dev/sda plainname && break; done < possible-words
```

----------

## Flarkis

This still pops up as one of the top results for "luks dictionary attack". Here is a one liner that actually works. 

```

while read p; do echo -n $p | cryptsetup --test-passphrase -d - luksOpen /dev/sda plainname && echo $p && break; done < passwords.txt

```

----------

