drivenmad / autocrack

Automatically exported from code.google.com/p/autocrack
1 stars 0 forks source link

autocrack depends on aircrack installed through apt-get to work #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As $aircracktest uses apt-cache to check for aircrack, it doesn't work if 
aircrack wasn't installed through apt-get. I guess it wasn't a problem before 
because aircrack-ng was available in Ubuntu's repositories. But, since 12.04, 
it's not the case anymore.

A quick and dirty fix was to change:
aircracktest=`apt-cache pkgnames aircrack-ng`
to:
aircracktest=`aircrack-ng > /dev/null 2>&1; if [ $? -eq 0 ]; then echo "yes"; 
else echo "no"; fi`

This, basically, tries to execure aircrack-ng and checks the error code. If it 
was successful (i.e. aircrack-ng exists), puts yes. If not, puts no.

It can be refactored into a function.

What do you think?

Original issue reported on code.google.com by vi...@vitorbaptista.com on 10 Sep 2012 at 6:51

GoogleCodeExporter commented 9 years ago
Sounds good. ill make the modification when i have a moment. 

Original comment by esmith2...@gmail.com on 10 Sep 2012 at 6:54

GoogleCodeExporter commented 9 years ago
i downloaded the script to my home directory but when i run it, i get error 
below.

"bash: ./autocrack.sh: No such file or directory"

what should i do?

Original comment by kasongas...@gmail.com on 7 Oct 2012 at 10:19

GoogleCodeExporter commented 9 years ago
Rename the file you downloaded to "autocrack.sh"

Original comment by esmith2...@gmail.com on 7 Oct 2012 at 4:10