Coder Social home page Coder Social logo

kbot's Introduction

The Amazing Automatic Kahoot Bot (kbot)

now with functional code

People have made bots and things for kahoot in the past, but this is a new and improved edition that actually does everything for you. This one actually answers the questions, unlike some other tools and spammers.

Getting Started

  • Make Kahoot Account
  • Install Python3
    • On MacOS, Install Homebrew, then install Python.
      • /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      • brew install python
  • Clone this project
    • git clone https://github.com/reteps/kbot.git
  • Install Dependencies
    • python3 -m pip install -r requirements.txt
  • Run Program
    • python3 kbot

Program arguments

python3 kbot
  --email [email protected] 
  --password XYZ

Please open a pull request or issue if you would like more functionality.

How does it work?

Intercepts and pretends to be a kahoot client. After receiving quiz name from host, looks up answers for quiz and uses them.

Caveats

Does not work when:

  • Kahoot is private
  • Answers are randomized
  • Questions are randomized

This is because this program uses the original question order and answer order, so if these are modified the wrong answer will be clicked.

Questions?

  • please open an issue

Contributors

  • reteps - Main programming
  • idiidk - For the challenge decoding

kbot's People

Contributors

dependabot[bot] avatar paris-ci avatar reteps avatar zap-wizard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kbot's Issues

Issue

This issue is probably not in its place , but im new to programming , so could you explain how to do the whole dependencies thing , ive cloned it to my pc but i dont get where i should install these dependencies and what they even are

undefined variable

On line 115 of grab.py, the variables 'co', 'co2', and 'co3' don't seem to be defined locally or globally, causing an error.

Could not open requirements

I'm quite new to python and am not really sure if i have done something wrong here. after i do python3 -m pip install -r requirements.txt
this error follows
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
and if i try to launch the program with
python3 kbot
this follows
python.exe: can't find 'main' module in 'kbot'

How to use?

I'm new to the linux environment, and I am confused on how exactly this works.

(I'm new to the site too, so I didn't know where to post this question either.)

Failed to auth password

I entered username and password correct, and correct game pin(yes i double checked)
it returns
Traceback (most recent call last): File "kbot", line 22, in <module> user.authenticate(email, password) File "/Users/icehacks/Downloads/kbot-master/klib.py", line 43, in authenticate raise KahootError('Unknown login issue')
Im pretty sure https://create.kahoot.it/rest/authenticate is dead

hello, am i doing something wrong?
I correctly aimed the terminal to the file and installed all dependencies

How to get the GameID

const gameId = // How do you get this

fetch(
  `https://create.kahoot.it/rest/kahoots/${gameId}/card/?includeKahoot=true`
)
  .then(res => res.json())
  .then(json => {
    return json.kahoot.questions
      .map((q, number) => {
        const { choices } = q;
        for (let i = 0; i < choices.length; i++) {
          if (choices[i].correct) {
            switch (i) {
              case 0:
                return `Q${number + 1}: red triangle - ${choices[i].answer}`;
                break;
              case 1:
                return `Q${number + 1}: blue diamond - ${choices[i].answer}`;
                break;
              case 2:
                return `Q${number + 1}: yellow circle - ${choices[i].answer}`;
                break;
              case 3:
                return `Q${number + 1}: green square - ${choices[i].answer}`;
                break;
            }
          }
        }
      })
      .join("\n");
  });

BTW on your kahoot account very nice organization you are in PEteR.

Flask site/webserver

I'm turning this into a flask site.
It will have http requests enabled, allowing remote bot connections.

Can't get the name of the quiz

Hi
The quizName variable return None in the _play() method. So the quiz can't find the quiz. Could you fixe that please ?

Kbot-Rewrite error

Traceback (most recent call last):
File "C:\Users(User)\Downloads\kbot-rewrite\kbot", line 10, in
user.checkPin()
File "C:\Users(User)\Downloads\kbot-rewrite\klib.py", line 132, in checkPin
currentTime = int(time.time())
NameError: name 'time' is not defined

Porting to JS

I'm gonna try and port this to Javascript :)
I have the baseline code. I just need to put it together in the right order.

Bulk issue

  • Works on Windows 7 and 10, except that Windows doesn't have "console escape sequences" like "\033[0;34m". I would recommend using sys.platform and making them empty string on Windows. CMD does have the possibility of having multiple colours, but it is one of the largest pains in programming. https://stackoverflow.com/questions/4339649.

  • You cannot copy paste to CMD before windows 10, so your only option is to type in the whole thing, my only thought would be to make a .bat with NP, paste and run it there. windows 10 & macosx only

  • if it is private it prints "not enough WiFi" and tries again, check if private

  • If the DM skips the question before bot answers, bot spams the answer and freezes

  • just going to be pedantic: dependency: Python 3

I need help

Hey, I need some help. I'm new to the github and coding community and I don't know what "git clone" and "dependencies" is and how to do them.

Selenium TimeoutException:While Playing

So Here is the stacktrace
Traceback (most recent call last):
File "C:\Users\danil\OneDrive\Desktop\danielkahootbot-master\kahootlib.py", line 77, in bot_answer
waitForItem(driver, "div#app",timeout=20)
File "C:\Users\danil\OneDrive\Desktop\danielkahootbot-master\kahootlib.py", line 13, in waitForItem
WebDriverWait(driver, timeout).until(expected_conditions.visibility_of_element_located((By.CSS_SELECTOR, css)))
File "C:\Users\danil\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "kbot", line 23, in
kahootlib.start_bot(sys.argv[2],NAME,colors)
File "C:\Users\danil\OneDrive\Desktop\danielkahootbot-master\kahootlib.py", line 67, in start_bot
bot_answer(driver,colors)
File "C:\Users\danil\OneDrive\Desktop\danielkahootbot-master\kahootlib.py", line 80, in bot_answer
except selenium.common.exceptions.TimeoutException:
NameError: name 'selenium' is not defined

for what I can understand I timeouts and then does not restart so when playing kahoot when I have like answered like 2 questions i just get that stacktrace and it does not run anymore isnt it just needing to catch the exception???

PyMiniRacer Does not work

pin > 722952
name > REE
AUTHENTICATED
Traceback (most recent call last):
File "kbot", line 23, in
user.checkPin()
File "/home/caleb/kbot/klib.py", line 174, in checkPin
self.sessionID = self.solveChallenge(resp.json()["challenge"])
File "/home/caleb/kbot/klib.py", line 182, in solveChallenge
solution = jsEngine.eval("".join(rebuilt))
File "/home/caleb/.local/lib/python3.6/site-packages/py_mini_racer/py_mini_racer.py", line 161, in eval
python_value = res.contents.to_python()
File "/home/caleb/.local/lib/python3.6/site-packages/py_mini_racer/py_mini_racer.py", line 292, in to_python
raise JSParseException(msg)
py_mini_racer.py_mini_racer.JSParseException: b'SyntaxError: Unexpected token )'

Pls Fix

Unknown login issue, need help

Install dependencies? [y/N] > y
email > [email protected]
pin > 688377
name > ree
Traceback (most recent call last):
File "kbot", line 22, in
user.authenticate(email, password)
File "C:\Users\danc4.YOGA\Downloads\kbot-master\kbot-master\klib.py", line 43, in authenticate
raise KahootError('Unknown login issue')
klib.KahootError: Unknown login issue

Klib returning Empty

I recently cloned the project, and after removing py_mini_racer, ran it, and the console Just returned with a Exit code of 0, meaning that It worked, but the file just closes instantly

Running: Windows 10
python 3.8
pip 19.0.3

As for code changed, just
# jsEngine = py_mini_racer.MiniRacer()
# solution = jsEngine.eval("".join(rebuilt))

    solution = execjs.eval("".join(rebuilt))

and

import execjs
# from py_mini_racer import py_mini_racer
# import dukpy
import requests

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.