Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError when OWTF is run without postgresql properly configured #414

Closed
DePierre opened this issue Apr 15, 2015 · 0 comments
Closed

ValueError when OWTF is run without postgresql properly configured #414

DePierre opened this issue Apr 15, 2015 · 0 comments
Labels

Comments

@DePierre
Copy link
Contributor

When running OWTF with a DB not properly configured, a ValueError is thrown.

root@kali32:~/owtf# python2 owtf.py 

 _____ _ _ _ _____ _____
|     | | | |_   _|   __|
|  |  | | | | | | |   __|
|_____|_____| |_| |__|

        @owtfp
    http://owtf.org

Traceback (most recent call last):
  File "owtf.py", line 300, in <module>
    main(sys.argv)
  File "owtf.py", line 263, in main
    ComponentInitialiser.initialisation_phase_1(root_dir, owtf_pid)
  File "/root/owtf/framework/dependency_management/component_initialiser.py", line 55, in initialisation_phase_1
    DB()
  File "/root/owtf/framework/db/db.py", line 68, in __init__
    self.create_session()
  File "/root/owtf/framework/db/db.py", line 97, in create_session
    self.Session = self.CreateScopedSession()
  File "/root/owtf/framework/db/db.py", line 146, in CreateScopedSession
    self.engine = self.CreateEngine(models.Base)
  File "/root/owtf/framework/db/db.py", line 133, in CreateEngine
    poolclass=NullPool)  # TODO: Fix for forking
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", line 346, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 49, in create
    u = url.make_url(name_or_url)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py", line 164, in make_url
    return _parse_rfc1738_args(name_or_url)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py", line 210, in _parse_rfc1738_args
    return URL(name, **components)
  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/url.py", line 60, in __init__
    self.port = int(port)
ValueError: invalid literal for int() with base 10: ''

OWTF should instead indicate that the DB is not configured.

@DePierre DePierre added the Bug label Apr 15, 2015
DePierre pushed a commit that referenced this issue Jun 30, 2015
Would output the following when misconfigured DATABASE_PORT in db.cfg:

    ERROR:root:Aborted by Framework: Database configuration file is potentially corrupted. Please check ~/.owtf/db.cfg
    [DB] invalid literal for int() with base 10: '5432b'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant