iclab / centinel

http://iclab.org/
MIT License
34 stars 17 forks source link

centinel proper ignores all command line arguments by default #151

Closed jakubd closed 9 years ago

jakubd commented 9 years ago

Replicate like so do a fresh install:

     sudo apt-get update
     sudo apt-get install -y python python-pip libssl-dev swig python-dev libffi-dev openvpn tcpdump
     sudo pip install -U pip
     sudo pip install -U dnspython requests argparse m2crypto pyopenssl ndg-httpsclient pyasn1 pip
     sudo pip install centinel

then run:

centinel --version

instead of parsing the arguments with argparse as written in https://github.com/iclab/centinel/blob/master/centinel.py centinel will run the turkey test.

vagrant@precise32:~$ centinel --version
Creating results directory in /home/vagrant/.centinel/results
Reading input from /usr/local/lib/python2.7/dist-packages/centinel/data/turkey.txt
Running turkey test.

centinel-dev package does not have this issue:

vagrant@precise32:~$ centinel-dev --version
Centinel 0.1.5.2
rpanah commented 9 years ago

@jakubd I couldn't reproduce this issue on my machine. I'm on origin/master.

rpanah commented 9 years ago

@jakubd, are you running ./centinel.py --version?

rpanah commented 9 years ago

@jakubd, I see you're using the packaged version of centinel, which hasn't been updated in close to a year. You should use the dev package for now, until someone updates the proper package.

jakubd commented 9 years ago

just pip install centinel and centinel --version (not .py)

To replicate use this Vagrantfile:

Vagrant.configure(2) do |config|
  config.vm.box = "hashicorp/precise32"
   config.vm.provision "shell", inline: <<-SHELL
     sudo apt-get update
     sudo apt-get install -y python python-pip libssl-dev swig python-dev libffi-dev openvpn tcpdump vim screen
     sudo pip install -U pip
     sudo pip install -U dnspython requests argparse m2crypto pyopenssl ndg-httpsclient pyasn1 pip
     sudo pip install centinel
   SHELL
end

and just do

vagrant up
vagrant ssh

in a clean directory to replicate

jakubd commented 9 years ago

I see-- Thanks Abbas. I guess the bigger issue here is the centinel lags that far behind centinel-dev. This is not expected behaviour so the bug should stand until someone updates the centinel package.

Currently if someone follows the instructions in README.md then there is no indication that they are getting >1yr old code so this should be fixed. In the interim, at the very least, I suggest updating README.md to indicate this is the case unless someone wants to take a crack at updating the old packages.

rpanah commented 9 years ago

@jakubd, you're right. I'll update README.md to reflect that. We should soon have a newer version that will also update the proper package.

ben-jones commented 9 years ago

@jakubd, try the new centinel-dev build. if that doesn't work, let me know and I can look into it more.