01BTC10 / pyrit

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

error if dictionary input file doesn't exist #383

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  pyrit -r capture-02.cap -i file_that_does_not_exist

What is the expected output?

a message saying that the file doesn't exist

What do you see instead?

Traceback (most recent call last):
  File "/usr/local/bin/pyrit", line 6, in <module>
    pyrit_cli.Pyrit_CLI().initFromArgv()
  File "/usr/local/lib/python2.7/dist-packages/pyrit_cli.py", line 117, in initFromArgv
    func(self, **options)
  File "/usr/local/lib/python2.7/dist-packages/pyrit_cli.py", line 165, in new_f
    f(*args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/pyrit_cli.py", line 932, in attack_passthrough
    with cpyrit.util.FileWrapper(infile) as reader:
  File "/usr/local/lib/python2.7/dist-packages/cpyrit/util.py", line 257, in __init__
    self.f = open(filename, mode)
IOError: [Errno 2] No such file or directory: 'file_that_does_not_exist'

What version of the product are you using? On what operating system?

latest trunk on Linux

Please provide any additional information below.

Should be a simple check to see if the file exists before trying to open it.

Original issue reported on code.google.com by ro...@digininja.org on 7 Feb 2012 at 12:58