Giter Club home page Giter Club logo

autoshift's Introduction

AutoSHiFt: Automatically redeem Gearbox SHiFT Codes

  • Compatibility: Python 2.7+/3.3+.
  • Platform: Crossplatform. Only tested on MacOs/Linux.
  • Version: 0.1

WIP

Installation

git clone [email protected]:Fabbi/autoshift.git

or download it as zip

you'll need to install a few dependencies

pip install requests beautifulsoup4 lxml

or if you want to use the scheduling

pip install requests beautifulsoup4 lxml apscheduler

Usage

  • for help
./auto.py --help
  • redeem codes for Borderlands 3 on Steam
./auto.py --game bl3 --platform steam
  • redeem codes for Borderlands 3 on Steam using Username and Password (Use quotes for User and Password)
./auto.py --game bl3 --platform steam --user "[email protected]" --pass "p4ssw0rd!123"
  • keep redeeming every hour (you need apscheduler for that)
./auto.py --game bl3 --platform steam --schedule
  • only redeem golden keys
./auto.py --game bl3 --platform steam --schedule --golden
  • only redeem non-golden keys
./auto.py --game bl3 --platform steam --schedule --non-golden
  • only redeem up to 30 keys
./auto.py --game bl3 --platform steam --schedule --golden --limit 30
  • only query new keys (why though..)
./auto.py --game bl3 --platform steam --golden --limit 0

Overview

This tool consists of 3 parts:

shift.py

This module handles the redemption of the SHiFT codes and could be used as standalone CLI tool to manually enter those codes. It queries login credentials on first use and saves the needed cookie to enable auto-login.

query.py

This module parses the codes from wherever they may come from (orcz.com at the moment) and creates/maintains the database. If you'd want to add other sources for SHiFT codes or future games, you'd make that here.

auto.py

This one is the commandline interface you call to use this tool.

Docker

Available as a docker image based on python3.8-alpine

Usage

docker run confusingboat/autoshift:latest \
  -e SHIFT_USER='<username>' \
  -e SHIFT_PASS='<password>' \
  -e SHIFT_GAMES='bl3 blps bl2 bl' \
  -e SHIFT_PLATFORMS='epic xbox ps' \
  -e SHIFT_ARGS='--schedule -v' \
  -e TZ='America/Chicago' \
  -v /path/to/keysdb/dir:/autoshift/data

Variables

SHIFT_USER (required)

The username/email for your SHiFT account

Example: johndoe123

SHIFT_PASS (required)

The password for your SHiFT account

Example: p@ssw0rd

SHIFT_GAMES (recommended)

The game(s) you want to redeem codes for

Default: bl3 blps bl2 bl

Example: blps or bl bl2 bl3

Game Code
Borderlands bl
Borderlands 2 bl2
Borderlands: The Pre-Sequel blps
Borderlands 3 bl3

SHIFT_PLATFORM (recommended)

The platform(s) you want to redeem codes for

Default: epic steam

Example: xbox or xbox ps

Platform Code
PC (Epic) epic
PC (Steam) steam
Xbox xbox
Playstation ps

SHIFT_ARGS (optional)

Additional arguments to pass to the script

Default: --schedule

Example: --schedule --golden --limit 30

Arg Description
--golden Only redeem golden keys
--non-golden Only redeem non-golden keys
--limit n Max number of golden keys you want to redeem
--schedule Keep checking for keys and redeeming every hour
-v Verbose mode

TZ (optional)

Your timezone

Default: America/Chicago

Example: Europe/London

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.