derv82 / wifite2

Rewrite of the popular wireless network auditor, "wifite"
GNU General Public License v2.0
6.45k stars 1.32k forks source link

Wifite2 fails with disk full #110

Closed RobertLHarris closed 6 years ago

RobertLHarris commented 6 years ago

I kept getting disk full issues when running longer scans on my Pineapple. I had to patch it to use /sd/tmp instead of /tmp. Maybe a command line for "--alt-tmp" or something or an env variable.

Also, it wasn't creating /tmp/ and I had to add:

if not os.path.exists(tmp): os.makedirs(tmp)

I would branch and submit but haven't gotten that good with Git yet.

kimocoder commented 6 years ago

Adding a switch for choosing directory for cache / saving would be a good idea not only for your Pineapple but also NetHunter devices and possible RPI's in some cases. Great suggestion!

derv82 commented 6 years ago

I guess an option like --temp-dir /path/to/temp would alleviate this problem.

And I'm using Python's built-in tempfile library, so if that's failing to create the root /tmp directory, then... yikes.

derv82 commented 6 years ago

Update/Fix: You can change the temp directory using environment variables in the command-line (stackoverflow).

If you usually run wifite using wifite, then do something like this:

TMPDIR=/path/to/the/tmp wifite

Or if you run wifite using python -m wifite then:

TMPDIR=/path/to/the/tmp python -m wifite

This will make wifite write temp files to /path/to/the/tmp/wifiteXXXXX. where XXXX is some randomly-generated letters.

Note: You have to make sure the path already exists (in the example, /path/to/the/tmp has to be a directory that exists).