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

./rootthebox.py --create-tables #31

Closed
BitSledge opened this issue Mar 31, 2014 · 3 comments
Closed

./rootthebox.py --create-tables #31

BitSledge opened this issue Mar 31, 2014 · 3 comments

Comments

@BitSledge
Copy link

./rootthebox.py --create-tables
[*] 20:50:36 : Creating the database ...
Traceback (most recent call last):
File "./rootthebox.py", line 155, in
main(parser.parse_args())
File "./rootthebox.py", line 111, in main
create()
File "./rootthebox.py", line 51, in create
from setup.create_database import create_tables, engine, metadata
File "/home/steve/Documents/RootTheBox/setup/create_database.py", line 21, in
from models import engine
File "/home/steve/Documents/RootTheBox/models/init.py", line 30, in
_config = ConfigManager.instance()
File "/home/steve/Documents/RootTheBox/libs/Singleton.py", line 40, in instance
self._instance = self._decorated()
File "/home/steve/Documents/RootTheBox/libs/ConfigManager.py", line 80, in init
self.refresh()
File "/home/steve/Documents/RootTheBox/libs/ConfigManager.py", line 114, in refresh
self.config.readfp(fp)
File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
self._read(fp, filename)
File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /home/steve/Documents/RootTheBox/rootthebox.cfg, line: 2
' Root the Box - Configuration File\n'

@moloch--
Copy link
Owner

Post the contents of your rootthebox.cfg file please.

@BitSledge
Copy link
Author

###############################################
      Root the Box - Configuration File
###############################################

[Server]
# Web server listen port
port = 8888

# Debug mode provides stack traces, etc
debug = True

# Bootstrap type 'production' / 'developement'
bootstrap = developement

# Set "domain" to your local ip/hostname, this is the address websockets will connect to
# Set to 'auto' to attempt to resolve your local ip automatically
domain = localhost

# Default theme
theme = cyborg.min.css

# Cache static files in memory
cache_files = True

[Logging]
# Sets the log level for the console / terminal
console_level = debug

# Enable/disable file logs
file_logs = True

# Set logging level for the file output (if save_logs is enabled)
file_level = debug

# Path to output file for logs (if save_logs is enabled)
logfile = rtb.log

# Allow admins to view logs from web ui
enable_logviewer = True

[Ssl]
# Enable/disable SSL server
# You'll need to manually setup an HTTP/302 to HTTPS if you want it
use_ssl = False

# Generate a self signed certificate/key like so:
# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout bar.key -out foo.crt

# Certificate file path
certificate_file = foo.crt
# Key file path
key_file = bar.key

[Cache]
# Memcached settings
memcached_host = 127.0.0.1
memcached_port = 11211

# Session settings (stored in memcached)
session_age = 1800
session_regeneration_interval = 1800

[Security]
# Comma separated list of ips that can access the admin interface
# For example: admin_ips = 127.0.0.1,192.168.0.25,10.34.0.2
admin_ips = 127.0.0.1,192.168.114.140,192.168.1.10

# If x-headers is set to 'True', the app will honor the real IP address
# provided by a load balancer in the X-Real-Ip or X-Forwarded-For header.
# NOTE: This can affect the IP address security restrictions.
x-headers = False

# max_password_length is the number of chars a user can have for their "bank password"
max_password_length = 7

[Recaptcha]
# Recaptcha private key; get one at http://recaptcha.com
use_recaptcha = yes
private_key = 6LcJJ88SAAAAAPPAN72hppldxema3LI7fkw0jaIa

[Database]
# Supports 'mysql', 'postgresql', or 'sqlite'; defaults to mysql
dialect = mysql

# This is the database name we're connecting to
name = rootthebox

# These are not used for sqlite
# Leave blank or set to 'RUNTIME' if you want to prompt for creds when the application starts
# this keeps sensitive db credentials out of plain-text files, and is recommended for production.
host = localhost
user = rtb
password = rootthebox

# Set orm_sql to 'True' to log sql queries made by the ORM this may
# contain sensitive information!  Enable only when you need to debug problems
# Very verbose when True
orm_sql = False
bot_sql = False

[Game]
# Most game settings are stored in the database
# but these are needed before we access the db
# Game name (appears in web ui)
game_name = Root the Box

# Allow users to create their own teams
public_teams = True

# Limit team size to
max_team_size = 3

# Require a registration token to create an account
restrict_registration = False

# Enable/disable use of the black market
use_black_market = True

# Enable/disable botnet features
use_bots = True

# Whitelist the IPs bots can connect from
whitelist_box_ips = False

# Reward amount for each bot per interval
bot_reward = 100

@moloch--
Copy link
Owner

You removed the '#' from line 2 (check the default config - https://github.com/moloch--/RootTheBox/blob/master/rootthebox.cfg#L2 ), you need to re-add it so that the line is a comment and not treated as a configuration setting; not a bug in the code, but I could certainly add better error handling around this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants