Skip to content

Commit

Permalink
Fix for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
eljeffeg committed Mar 8, 2023
1 parent 4b3837a commit 7aae369
Show file tree
Hide file tree
Showing 3 changed files with 1,763 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ develop-eggs

# XML exports
*.xml
!demo_juiceshop.xml

# SQLite3 databases
*.db
Expand Down
17 changes: 9 additions & 8 deletions rootthebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,9 @@ def options_parse_environment():
options[item] = value
else:
logging.error(
"Environment Confirguation (%s): unable to convert type %s to %s for %s"
"Environment Configuration (%s): unable to convert type %s to %s for %s"
% (item.upper(), type(value), type(options[item]), value)
)
if os.environ.get("DEMO"):
setup_xml(["setup/demo_juiceshop.xml"])
from libs.ConfigHelpers import create_demo_user

logging.info("Setting Up Demo Environment...")
create_demo_user()
options.autostart_game = True


def help():
Expand Down Expand Up @@ -1167,6 +1160,14 @@ def help():
# Make sure that cli args always have president over the file and env
options.parse_command_line()

if os.environ.get("DEMO"):
setup_xml(["setup/demo_juiceshop.xml"])
from libs.ConfigHelpers import create_demo_user

logging.info("Setting Up Demo Environment...")
create_demo_user()
options.autostart_game = True

# If authenticating with Azure AD (i.e. enterprise scenario) There's a few settings which
# don't make sense, so force them to disabled.
if options.auth.lower() == "azuread":
Expand Down
1,753 changes: 1,753 additions & 0 deletions setup/demo_juiceshop.xml

Large diffs are not rendered by default.

0 comments on commit 7aae369

Please sign in to comment.