0

Okay, so I am trying to pipe crunch to aircrack-ng, and I get the following error:

[root@x IN /x/x]$ crunch 8 8 -t @o@@@@@@ | aircrack-ng - -b 94:0E:6B:A5:F3:32 Crunch will now generate the following amount of data: 72286291584 bytes 68937 MB 67 GB 0 TB 0 PB Crunch will now generate the following number of lines: 8031810176 Opening - Unsupported file format (not a pcap or IVs file). [root@x IN /x/x]$
So as you can see, crunch works fine. I even tried it without the pipe, and it worked perfectly, but aircrack doesn't seem to be able to read it. I have eliminated the problem to the format of crunch's output, but still tell any other possible reasons for the error.

If I give aircrack a file to read from I get this error:

[root@x IN /x/x]$ sudo crunch 8 8 -t @o@@@@@@ -d 5 | aircrack-ng -w - mifipass.cap -b 94:0E:6B:A5:F3:32 mifipass2 Opening mifipass.cap read(file header) failed: Success Crunch will now generate the following amount of data: 72286273800 bytes 68937 MB 67 GB 0 TB 0 PB Crunch will now generate the following number of lines: 8031808200 [root@x IN /x/x]$ This is the most I could find on the subject: https://unix.stackexchange.com/questions/124580/what-does-read-swap-header-failed-success-mean

Does anyone know how to fix this?


Edit: So, I found out part of the problem: I was using an n-dash instead of an m-dash:
[root@x IN /x/x]$ crunch 8 8 -t @o@@@@@@ | aircrack-ng - -b 94:0E:6B:A5:F3:32 should be:
[root@x IN /x/x]$ crunch 8 8 -t @o@@@@@@ | aircrack-ng – -b 94:0E:6B:A5

But now I have this error:

[root@x IN /x/x]$ crunch 8 8 | aircrack-ng -b 94:0E:6B:A5:F3:32 -w – mifipass.cap Crunch will now generate the following amount of data: 1879443581184 bytes 1792377 MB 1750 GB 1 TB 0 PB Crunch will now generate the following number of lines: 208827064576 ERROR: Opening dictionary – failed (No such file or directory) ERROR: Opening dictionary – failed (No such file or directory) Opening mifipass.cap read(file header) failed: Success [root@x IN /x/x]$ :F3:32`

0

Okay, I found the problem: I wasn't using a .cap file. When you want to crack a wireless key with aircrack-ng, what you have to do is first capture enough encrypted packets (until you get a 4-way handshake) using airodump-ng. After you did this and saved the output to a file, you must use this file with aircrack-ng; as this is the file aircrack-ng will use to break the encryption (rather than trying the password on the actual WiFi network. Here is what to do:

$ airodump-ng <wireless-interface>
$ airodump-ng -c <channel> --bssid <mac:address> -w <name-for-new-file> <wireless-interface>
$ crunch <options> | aircrack-ng -w <file.cap> - --bssid <mac:address>

What I did here is simple:
1-A general scan of available networks. You must find your network and copy the bssid and channel.
2-Captured a 4-way handshake for my wireless network and saved it into a file without an extension
3-Used the file with the .cap extension with aircrack-ng while telling it to read from standard output. (airodump added the extension to the file automatically)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.