Giter VIP home page Giter VIP logo

numbersense's Introduction

Numbersense.py

Run on Repl.it !GitHub commit activity GitHub Workflow Status

This is a program that provides practice number sense questions to prepare for the Number Sense UIL compeition.

Authors

Unmesh, Sopan

numbersense's People

Contributors

sjalkote avatar pikamaster23 avatar

Stargazers

 avatar  avatar suhas avatar

Watchers

 avatar

numbersense's Issues

๐Ÿ› Circular dependency error (Player.py and utils.py)

There is currently a circular dependency error present in Player.py and utils.py which can be resolved by moving around functions to better locations.

Tied into the fix for this issue should also be a fix to the following error that appears in some cases:

Traceback (most recent call last):
  File "numbersense/./main.py", line 3, in <module>
    print(utils.create_default("amogus"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "numbersense/utils.py", line 511, in create_default
    Player(username, QuizType.EASY, password="password")
  File "numbersense/Player.py", line 101, in __init__
    self.password: str = utils.encrypt_password(password, True)  # Hashed password as str
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "numbersense/utils.py", line 435, in encrypt_password
    hashed_pwd = bcrypt.hashpw(bytes, bcrypt.gensalt())  # Newly hashed & salted password
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: hashpw() argument 1 must be str, not bytes

Process finished with exit code 1

๐Ÿ› Exploit allows account access without using a password

An exploit allows users to login to an account without needing to use the password. Due to the app flow, if a user creates an account name such as Test, the Player class will fix the name by lowercasing (which is something else that needs to be fixed, uppercase should be allowed) and this bypasses the check for existing users because the name change happens in the __init__() constructor in the Player class. Changing the sequence order should fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.