Coder Social home page Coder Social logo

kahoot-answer-bot's Introduction

Kahoot Answer Bot

A bot that takes the name or ID of a kahoot and gets a perfect score with the nickname of your choosing.

This project was started by reteps but is has been broken for quite a while, so I forked it and made it work.

Features

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

  • Search by quiz name (requires login) or ID
  • 2FA compatible

Installation

  • Optional: Make a Kahoot Account if you don't have the Kahoot's ID and want to search for a Kahoot by name

  • Install Python3.9

    On Windows visit https://www.python.org/downloads/windows/

    • Click latest Python 3.9 release
    • Scroll down to the bottom to the section titled "Files"
    • Click the Windows Installer (64-bit) link to download the ".exe"
    • In File Explorer right click the file and click "Run as Administrator"
    • Check the boxes "Install launcher for all users (recommended)" and "Install Python 3.9 to path"

    On macOS 11+ (Intel) and macOS 11+ (Apple Sillicon) visit "https://www.python.org/downloads/macos/"

    • Click latest Python 3.9 release
    • Scroll down to the bottom to the section titled "Files"
    • Click the macOS 64-bit universal2 installer link to download the ".pkg"
    • Run the downloaded ".pkg"

    On Debian GNU/Linux 11+ based distros:

    • sudo apt update
    • sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev curl libbz2-dev
    • wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
    • tar -xf Python-3.9.7.tgz
    • cd Python-3.9.7
    • ./configure --enable-optimizations
    • make
    • sudo make altinstall

    On Arch Linux based distros run:

    • sudo pacman -S --needed base-devel git
    • git clone https://aur.archlinux.org/python39.git
    • cd python39
    • makepkg -si
  • Download and unzip or clone this repo

  • Install Dependencies

    • python3.9 -m pip install -r requirements.txt

On other Linux based distros install python3.9 from your package manager.

Usage

Open a terminal (Command Prompt on Windows) and navigate to the directory (folder) containing kbot. Then use the following command, replacing [options] with any options you want to use (listed below).

python kbot [options]
-e, --email
The email used to login to create.kahoot.it

-a, --password
The corresponding password used to login to create.kahoot.it

-n, --nick
The nickname to join the Kahoot with

-p, --pin
The game pin

-s --search
Search for a quiz without joining a Kahoot. Cancels nick and pin options.

-q, --quizName
The quiz's name

-i, --quizID
The quiz's ID

-d, --debug
Output go brrrrrrrrrrrrr

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 randomized the wrong answer will be clicked.

Contributors

  • Raymo111 - Fixing it, adding 2FA and search by ID
  • reteps - Main programming
  • idiidk - For the challenge decoding

kahoot-answer-bot's People

Contributors

dependabot[bot] avatar paris-ci avatar raymo111 avatar reteps avatar sealldeveloper 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  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

kahoot-answer-bot's Issues

Get rid of asyncio errors

Upon a normal exit, there are asyncio errors of the form

Exception in callback TransportBase._connect_done(<Task cancell.../utils.py:22>>)
handle: <Handle TransportBase._connect_done(<Task cancell.../utils.py:22>>)>
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

asyncio.exceptions.CancelledError
Exception in callback WebSocketTransport._receive_done(<Task cancell...ocket.py:224>>)
handle: <Handle WebSocketTransport._receive_done(<Task cancell...ocket.py:224>>)>
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

asyncio.exceptions.CancelledError

AttributeError: 'NoneType' object has no attribute 'mr_free_context'

host@MacBook-Pro kahoot-answer-bot-master % python3 kbot
name > test
pin > 9185332
quizID > bb6c79dc-0768-442e-9c26-d8c012af5ccf
RuntimeError: Native library not available at /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/py_mini_racer/libmini_racer.dylib
Exception ignored in: <function MiniRacer.__del__ at 0x10647b1a0>
AttributeError: 'NoneType' object has no attribute 'mr_free_context'

How can I fix this error?

Error even though quiz is public

I am having this error:

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) File "C:\Users\nodin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\aiocometd\transports\websocket.py", line 261, in _receive_done result = future.result() asyncio.exceptions.CancelledError Traceback (most recent call last): File "D:\Coding\kahootanswebot\kbot", line 24, in <module> user.startGame() File "D:\Coding\kahootanswebot\klib.py", line 55, in startGame loop.run_until_complete(self._play()) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "D:\Coding\kahootanswebot\klib.py", line 99, in _play self.answers = await self.findAnswers(quizName, quizAnswers) File "D:\Coding\kahootanswebot\klib.py", line 179, in findAnswers quizProperties = await self.searchQuiz(name, exceptedAnswers) File "D:\Coding\kahootanswebot\klib.py", line 175, in searchQuiz raise KahootError("No quiz found. (private?)") klib.KahootError: No quiz found. (private?)

not working

'python3.9' is not recognized as an internal or external command,
operable program or batch file

Typerror

TypeError: Semaphore.init() got an unexpected keyword argument 'loop'
everytime

`asyncio.exceptions.CancelledError KeyError: 'answer'`

Hello,
When I run kbot I have this error :


name > heey      
pin > 2483188
quizID > c316b5c7-eebe-496f-b0b0-85381c174a62
No accepted answers
Title: Bambi Spring Trivia
Creator: Disney_Official
Desc: Celebrate spring by reliving memorable moments from the classic story of Bambi and his friends. © Disney. All rights reserved. #disney #disneyspring #bambi
Exception in callback TransportBase._connect_done(<Task cancell.../utils.py:22>>)
handle: <Handle TransportBase._connect_done(<Task cancell.../utils.py:22>>)>
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

asyncio.exceptions.CancelledError
Exception in callback WebSocketTransport._receive_done(<Task cancell...ocket.py:224>>)
handle: <Handle WebSocketTransport._receive_done(<Task cancell...ocket.py:224>>)>
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

asyncio.exceptions.CancelledError
KeyError: 'answer'

Including video in git repo bloats file size

The video adds about 97 megabytes of bloat to the repository. Please consider hosting the video externally and then linking to it in the readme file so we don't have to download 97 extra megabytes on a 1 megabyte/second download.

I have an issue with py_mini_racer can you please help

Native library not available at /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/py_mini_racer/libmini_racer.dylib
Exception ignored in: <function MiniRacer.del at 0x1046928e0>
AttributeError: 'NoneType' object has no attribute 'mr_free_context'

No module named pip

Hey idk if u still support this but i've been getting these errors
/usr/bin/python3: No module named pip
NameError: name 'requests' is not defined
im on arch linux and looked through the other issues but none of them worked. Not really good at python either. pls help

Macbook Python py mini racer

My computer was Macbook air M2, MacOS Sonoma 14.0, and while I try to use the Kahoot bot by @Raymo111 , it outputs this:
name > kahoot_GENIUS
pin > 568415
quizID > fc0a4d21-05c1-4903-9490-cc9d8924d1b2
OSError: dlopen(/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py_mini_racer/libmini_racer.dylib, 0x0006): tried: '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py_mini_racer/libmini_racer.dylib' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py_mini_racer/libmini_racer.dylib' (no such file), '/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/py_mini_racer/libmini_racer.dylib' (not a mach-o file)
Exception ignored in: <function MiniRacer.del at 0x102780b80>
AttributeError: 'NoneType' object has no attribute 'mr_free_context'

I think it might have some issue with Python and apple's chips, can someone please help me solve this problem?

Deprecated Loop Parameters

As of python 3.10, the loop parameter was removed from Semaphore(). The bot no longer works unless you use an old python version.

Error when attempting join

After filling out the pin and quiz id I am met by the error "TypeError: As of 3.10, the loop parameter was removed from Semaphore() since it is no longer necessary" Any help would be welcomed, thank you.

[FR] Delay Argument

A delay that could work like this:
python3 kbot -something time
and the bot would wait that long also a argument that could add inconsistency so the bot don't answer the at the same exact time every time

command not working

xijam@penguin:~/kahoot-answer-bot$ python3 kbot [-a PASSWORD]
usage: kbot [-h] [-s] [-d] [-e EMAIL] [-a PASSWORD] [-n NICK] [-p PIN]
[-q QUIZNAME] [-i QUIZID] [-m MAXCOUNT]
kbot: error: unrecognized arguments: [-a PASSWORD]

Support polls

While many teachers don't use them much would love to see it supported at least

requirements.txt

For my console (CMD) I enter **"python3 -m pip install -r requirements.txt"**a but there comes an error that it has not found that.

Need Help

Hey,Sorry For the huge inconvience,
I dont know anything about python nothing literally.Can you please help me out here<3.It would mean the world to me

Just dosent work...

PS C:\Users\jacob\Downloads\kahoot-answer-bot-2.2> python3 kbot
name > Jacob
pin > 1233173
quizID > eab4ca4e-e3a7-4672-8cfc-62bd0b93f661
TypeError: As of 3.10, the loop parameter was removed from Semaphore() since it is no longer necessary

I have noid

Doesn't join to kahoots

So, the bot doesn't join the kahoot but shows the correct answers in the cmd. It worked yesterday, today doesn't join.

Support slides

If author add more Slide to explain the answer, the code will not find out 'answer' key.

Needing Help

So basically when I try to input the "Quiz id" it just says
"Traceback (most recent call last):
** IDLE Internal Exception:
NameError: name 'requests' is not defined"
and I don't really get whats happening so if anyone can respond that would be amazing

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.