Apparate is an automated utility to synchronize your accepted HackerRank solutions directly to a designated GitHub repository.
This project is a modernized fork of the original Apparate utility by Sanket Gautam, updated with native API requests, secure state management, and a clean desktop interface.
- Dual Interfaces: Use either the native desktop GUI or the command-line interface (CLI).
- Fast and Native API Auth: Completely bypasses slow browser automation, parental control blocks, and Cloudflare challenges by utilizing your direct HackerRank Session Cookie.
- Secure State Persistence: Tracks synchronized submissions using standard
jsonstored directly in your GitHub repository, replacing insecure legacy serialization. - Local Processing: All code extraction and processing occurs locally on your machine without third-party network proxies.
- Standalone Binary: Includes an automated build script to compile a portable Windows
.exeapplication.
Apparate includes a native desktop application with a neutral dark interface and Inter typography.
python apparate_gui.pyYou can run the pre-built executable directly:
dist/Apparate.exe
To rebuild the standalone Windows binary, run the automated build script:
python build.pyThe script automatically handles packaging, cleans previous build artifacts, and outputs a lightweight dist/Apparate.exe.
Apparate can also be executed directly via terminal or scheduled via cron.
-
Clone the repository:
git clone https://github.com/Horrid-12/Apparate.git cd Apparate -
Install dependencies:
pip install -r requirements.txt
python -m scripts.apparate --repo <Submissions_Repo_Name> --user <HackerRank_Username> --cookie <HackerRank_Cookie> --token <GitHub_Token>Options:
--repo TEXT Name of GitHub repository to store submissions
--user TEXT Username of your HackerRank account
--cookie TEXT Session Cookie (_hrank_session) of your HackerRank account
--token TEXT GitHub Personal Access Token with 'repo' scope
--help Show this message and exit.
To bypass aggressive bot detection (Cloudflare) and parental controls that block headless browsers, Apparate now uses direct HTTP REST API calls using your HackerRank session cookie.
To get your cookie:
- Log into HackerRank in your normal browser (Edge, Chrome, or Firefox).
- Press F12 to open Developer Tools.
- Go to the Application (Chrome/Edge) or Storage (Firefox) tab.
- Expand Cookies on the left sidebar and select
https://www.hackerrank.com. - Find the cookie named
_hrank_session. - Copy its Value and paste it into Apparate.
To allow Apparate to create and update your solutions repository:
- Go to GitHub Settings -> Developer Settings -> Personal Access Tokens -> Tokens (classic).
- Generate a new token with the
reposcope. - Use this token in the GUI or pass it to the
--tokenCLI argument.
scripts/apparate.py: Core orchestrator managing GitHub API operations, repository creation, commit workflows, and submission state tracking (submissions.json).scripts/spider.py: Extremely fast REST API automation layer that traverses HackerRank submissions, fetches JSON endpoints, and extracts actual code submissions locally.apparate_gui.py: Native desktop GUI built with Tkinter, featuring live log streaming and credential caching.build.py: Automated PyInstaller packaging pipeline.
- Original concept and implementation by Sanket Gautam: sanketgautam/Apparate
- Modernized and maintained by Horrid-12
This project is open-source under the MIT License.