sensepost / snoopy-ng

Snoopy v2.0 - modular digital terrestrial tracking framework
Other
429 stars 128 forks source link

snoopy-ng git does not ship with or create a instance of snoopy.db #53

Closed thesle3p closed 9 years ago

thesle3p commented 9 years ago

While the installer does a great job of installing dependencies and even telling snoopy-ng where to look for snoopy.db snoopy-ng does not come with a empty instance of snoopy.db nor does the installer create one. causing the following issues when snoopy is run with out arguments or with -iii : Traceback (most recent call last): File "/usr/bin/snoopy", line 428, in main() File "/usr/bin/snoopy", line 353, in main plugins = common.get_plugins() File ""/snoopy-ng/includes/common.py", line 24, in getplugins m = import(plug, fromlist="Snoop").Snoop File ""/snoopy-ng/plugins/server.py", line 17, in from includes import webserver File "snoopy-ng/includes/webserver.py", line 27, in auth = auth() File ""snoopy-ng/includes/auth_handler.py", line 46, in init self.db.create(drone_tbl_def) File "", line 2, in create File "/usr/lib/python2.7/site-packages/sqlalchemy/util/deprecations.py", line 106, in warned return fn(_args, *_kwargs) File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/interfaces.py", line 924, in create raise NotImplementedError() NotImplementedError

The solution is to add either a empty snoopy.db file to the git repo or have the installer create one and populate it with the tables it needs. I guess having a empty snoopy.db in the git repo would be a easier fix then adding logic to do it to the installer script.

maximcherny commented 9 years ago

What version of sqlalchemy are you running? I had similar issues with the more recent ones, but not with 0.7.8.

thesle3p commented 9 years ago

0.9.9-2 on Manjaro. On Thu, 2015-04-23 at 21:20 -0700, maximcherny wrote:

What version of sqlalchemy are you running? I had similar issues with the more recent ones, but not with 0.7.8. — Reply to this email directly or view it on GitHub.

maximcherny commented 9 years ago

Downgrading to 0.7.8 should get you going. Latest Kali for instance still comes with that.

thesle3p commented 9 years ago

Thanks it worked. Weird that newer sqlalchemy broke snoopy-ng. On Fri, 2015-04-24 at 00:57 -0700, maximcherny wrote:

Downgrading to 0.7.8 should get you going. Latest Kali for instance still comes with that. — Reply to this email directly or view it on GitHub.

rookdave commented 9 years ago

I was running into this issue and figured out what was wrong. The install assumes I'm installing to /root/snoopy-ng rather than where I had, /etc/snoopy-ng. It should be storing the path it was run from and then using that going forward (or update the documentation, etc).

glennzw commented 9 years ago

@rookdave I don't think there are any absolute path references. The install.sh file creates shortcuts from the current directory. Where did you run into this?

https://github.com/sensepost/snoopy-ng/blob/master/install.sh#L90

thesle3p commented 9 years ago

It looks for it here https://github.com/sensepost/snoopy-ng/blob/master/includes/auth_handler.py#L164

glennzw commented 9 years ago

@rookdave @thesle3p Ah, thanks for pointing that out! I've pushed a fix in https://github.com/sensepost/snoopy-ng/commit/acc6af8c19d2ef34b57d6b23d514ae9f1037d47f