Skip to content
 
 

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apparate

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.


Key Features

  • 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 json stored 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 .exe application.

Desktop GUI

Apparate includes a native desktop application with a neutral dark interface and Inter typography.

Running from Source

python apparate_gui.py

Running the Standalone Executable

You can run the pre-built executable directly:

dist/Apparate.exe

Building the Executable

To rebuild the standalone Windows binary, run the automated build script:

python build.py

The script automatically handles packaging, cleans previous build artifacts, and outputs a lightweight dist/Apparate.exe.


Command Line Interface (CLI)

Apparate can also be executed directly via terminal or scheduled via cron.

Installation

  1. Clone the repository:

    git clone https://github.com/Horrid-12/Apparate.git
    cd Apparate
  2. Install dependencies:

    pip install -r requirements.txt

Usage

python -m scripts.apparate --repo <Submissions_Repo_Name> --user <HackerRank_Username> --cookie <HackerRank_Cookie> --token <GitHub_Token>

Options

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.

HackerRank Cookie Authentication

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:

  1. Log into HackerRank in your normal browser (Edge, Chrome, or Firefox).
  2. Press F12 to open Developer Tools.
  3. Go to the Application (Chrome/Edge) or Storage (Firefox) tab.
  4. Expand Cookies on the left sidebar and select https://www.hackerrank.com.
  5. Find the cookie named _hrank_session.
  6. Copy its Value and paste it into Apparate.

GitHub Access Token Setup

To allow Apparate to create and update your solutions repository:

  1. Go to GitHub Settings -> Developer Settings -> Personal Access Tokens -> Tokens (classic).
  2. Generate a new token with the repo scope.
  3. Use this token in the GUI or pass it to the --token CLI argument.

Architecture Overview

  • 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.

Credits and Acknowledgments


License

This project is open-source under the MIT License.

About

Tool to synchronize HackerRank with GitHub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages