lakiw / pcfg_cracker

Probabilistic Context Free Grammar (PCFG) password guess generator
314 stars 68 forks source link

ImportError: No module named 'pcfg_manager.file_io'; 'pcfg_manager' is not a package #3

Closed shirnschall closed 8 years ago

shirnschall commented 8 years ago

I don't know why but when I try to run pcfg_manager.py I get an "No module named 'pcfg_manager.file_io'" error.

Platform:

$cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.10
DISTRIB_CODENAME=wily
DISTRIB_DESCRIPTION="Ubuntu 15.10"
$uname -a
Linux ubuntu 4.2.0-30-generic #36-Ubuntu SMP Fri Feb 26 00:58:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Error:

$./pcfg_manager.py 
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 2218, in _find_and_load_unlocked
AttributeError: 'module' object has no attribute '__path__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./pcfg_manager.py", line 44, in <module>
    from pcfg_manager.file_io import load_config, load_rules
  File "/home/user/pcfg-py/python_pcfg_cracker/pcfg_manager.py", line 44, in <module>
    from pcfg_manager.file_io import load_config, load_rules
ImportError: No module named 'pcfg_manager.file_io'; 'pcfg_manager' is not a package
lakiw commented 8 years ago

Dough, I had an issue with my .gitignore file so I wasn't pushing everything. The problem should be fixed. More importantly though, the current version of the pcfg_manager.py is a work in progress. It doesn't actually read in a real grammar yet or appropriately parse the dictionary file. Basically I set it up to see if I could get the grammar part of it working and then have been very slowly updating the training program. Now that the training program is nearly done I need to go back to pcfg_manager.py and have it read in the generated grammar. Long story short, thanks for pointing out the problem, but a more serious issue is that it isn't in a working state even if I commit all the files ;p

shirnschall commented 8 years ago

Thank you :D Guess I've to keep using v0.7. I'm currently working on a paper and wanted to use the newest version. Please let me know when it's in a working state. btw why do you use python instead of c/c++?

lakiw commented 8 years ago

Well one of the problems with the original C++ version was it wasn't fast enough so of course I went with python ;p In all seriousness though, I wanted to make a new version that was more flexible in how the grammar was generated and used and python supports that type of mindset better than C++. For example, I desperately want to add better Markov brute force support into the grammar since input dictionaries leave a lot to be desired. Therefore if you take a look at my new code you'll see that it really is more of a general purpose PCFG terminal generator vs a "password cracking PCFG". Of course I need to spend more time actually working on it, finishing it to make that a reality ;p