Andrew J. McGehee's Kattis submission client adapted for Windows.
Python is required and python3 must be linked (run python3
to check).
- Clone this repo:
git clone https://github.com/alexlwn123/AutoKat
. - Login to kattis and download or copy your .kattisrc file from
https://icpc.kattis.com/download/kattisrc
. - Move your .kattisrc file into the same directory as
AutoKat.py
.
-
Name solutions
[problem id].[extention]
.If this is confusing, check out my Kattis Repository and copy the file nameing conventions. You don't need to sort by languages, the program just looks for the file name.
-
To post a solution run the following command:
> python3 autokat.py -p [problem id]
This will search your current directory for a file with the same name.
-
I adapted Andrew's program to use the naming conventions that I prefer. It works slightly differently than Andrew's. While his uses the directory name, mine uses the file name.
-
I only implemented a fix for Submission ie. post:
-p
because that's only what I use. I commented the sections involving theget
andrun
options, as they don't work on windows. -
All solution files must use the following naming format:
[problem id].xxx
-
To post a solution run the following command:
> python3 autokat.py -p [problem id]
This will search your current directory for a file with the same name. -
The script automatically detects the language being used in the submission. It supports C++, Java, Python2, Python3, and Common Lisp.
-
I'd suggest setting up aliases on cmd. Here is a Tutorial on how to set up permanent doskeys (aliases) on cmd. I have
autokat
aliased topython3 C:\path\to\file\autokat.py $*
, which allows me to run autokat with> autokat -p [problem id]
from any directory.
- We've talked about building this for a while now...
- This script clones a git repo of Kattis solutions and automatically submits them all.
- UPDATE: Added support for code obfuscation. Adapted existing cpp obfuscator. Original Repo
Usage: AutoKat.py [-h] [-p problem-id] [-v] [-c url] [-o] [-l] [-u]
optional arguments:
-h, --help show this help message and exit
-p problem-id, --post problem-id
submit a kattis problem
-v, --verbose make output verbose
-c url, --cheat url get git repo/ submit problems
-o, --obfuscate Obfuscates solutions before submitting
-l, --list lists solved problems
-u, --update update ratings of solved problem
-
Usage:
python3 KattisHack.py -c [URL OF GIT REPO]
- Use the -o flag for obfuscation (Only cpp currently supported)
- Must have your
.kattisrc
in the same directory asKattisHack.py
. - It works using any repo that uses problem ids as file names. The script will bring all solution files to the root directory of the repository upon cloning.
- The program saves a list of solved problems to avoid duplicate submissions. It stores the list in
.\data\solved.txt
.
-
Notes:
- This is cheating.
- I'd recommend using an alternate account, as using this will completely deauthenticate your legitimate work.
- After running this on a fresh account for couple of days, it accumulated over 2500 points, landing the account in the top 50 of the world. Account
- I'm betting that Kattis will ban my account any day now. Use at your own risk. [DONE]
-
UPDATE:
- After 48 hours, Kattis removed the account from the leaderboards due to plagiarised. Very impressive response time.
- I've started another account using the obfuscator on all submissions. I'm curious to see if this will lengthen the time it takes for Kattis to remove the account.