bl3_auto_vip

package module
v0.0.0-...-640a5c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

README

BL3 Auto VIP + Shift

Cross platform Go app for automatically redeeming VIP/Shift codes for Borderlands 3. Also redeems VIP activities such as weekly twitter/facebook points.

Getting Started

  1. Make a VIP account at https://borderlands.com/en-US/vip/
  2. Download program from above link
  3. Unzip the folder
  4. Run it, you will be prompted for username and password
  5. Enter username and password (we only use this info to sign into borderlands)
  6. Watch it do its magic
  7. Repeat when more codes come out

Run it with --help to view command line args that are supported.

Installing
Using go
go get -u github.com/matt1484/bl3_auto_vip
Docker

To run from source:

  1. install docker
  2. download project
  3. navigate to project
  4. run docker build -t bl3 .
  5. run docker run -it -v auto_bl3_vip:/root/.config/bl3-auto-vip bl3
    • The mounted volume will keep track of existing codes that have been used already
Docker Compose

To run from source:

  1. Installer docker and docker-compose
  2. Download project
  3. Navigate to project
  4. Run BL3_EMAIL="me@myemail.com" BL3_PASSWORD="mypassword" docker-compose up
    • Replace "me@myemail.com" with your login email address
    • Replace "mypassword" with your login password
Using the prebuilt releases

The binaries/executables are released here

FAQs

Why does my operating system say it's an unrecognized/untrusted app?

Telling the operating system that we're a trusted source is expensive. This is a small open source project and we don't have the funds to correctly sign the app.

Running the app on macOS Catalina

macOS Catalina may refuse to run the app because it is "from an unidentified developer". To get around this, right click on the app in Finder, and while holding the ⌥ Option key, click Open in the menu. You will be prompted with a message similar to this:

macOS cannot verify the developer of "bl3-auto-vip". Are you sure you want to open it?

Click the Open button and the app will run in your terminal. From that point forward you will be able to run the app directly or from your terminal without any issues.

Why does my antivirus flag this program?

It's a false positive. If you don't trust us, you can look at the code and compile it yourself. That's one of the beauties of an open source project!

It's not working. What should I do?

File an issue here with as much detail as you can provide. We're working on adding additional logging and a bug template to better assist with any issues.

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonFromBytes

func JsonFromBytes(bytes []byte) *gojsonq.JSONQ

func JsonFromString

func JsonFromString(s string) *gojsonq.JSONQ

Types

type Bl3Client

type Bl3Client struct {
	HttpClient
	Config Bl3Config
}

func NewBl3Client

func NewBl3Client() (*Bl3Client, error)

func (*Bl3Client) GenerateVipCodeUrlMap

func (client *Bl3Client) GenerateVipCodeUrlMap() (map[string]string, error)

func (*Bl3Client) GetCodePlatforms

func (client *Bl3Client) GetCodePlatforms(code string) ([]string, bool)

func (*Bl3Client) GetFullShiftCodeList

func (client *Bl3Client) GetFullShiftCodeList() (ShiftCodeMap, error)

func (*Bl3Client) GetFullVipCodeMap

func (client *Bl3Client) GetFullVipCodeMap() (VipCodeMap, error)

func (*Bl3Client) GetRedeemedVipCodeMap

func (client *Bl3Client) GetRedeemedVipCodeMap() (VipCodeMap, error)

func (*Bl3Client) GetShiftPlatforms

func (client *Bl3Client) GetShiftPlatforms() (StringSet, error)

func (*Bl3Client) GetVipActivities

func (client *Bl3Client) GetVipActivities() ([]VipActivity, error)

func (*Bl3Client) Login

func (client *Bl3Client) Login(username string, password string) error

func (*Bl3Client) RedeemShiftCode

func (client *Bl3Client) RedeemShiftCode(code, platform string) error

func (*Bl3Client) RedeemVipActivity

func (client *Bl3Client) RedeemVipActivity(activity VipActivity) bool

func (*Bl3Client) RedeemVipCode

func (client *Bl3Client) RedeemVipCode(codeType, code string) (string, bool)

type Bl3Config

type Bl3Config struct {
	Version             string            `json:"version"`
	LoginUrl            string            `json:"loginUrl"`
	LoginRedirectHeader string            `json:"loginRedirectHeader"`
	SessionIdHeader     string            `json:"sessionIdHeader"`
	RequestHeaders      map[string]string `json:"requestHeaders"`
	SessionHeader       string            `json:"sessionHeader"`
	Vip                 VipConfig         `json:"vipConfig"`
	Shift               ShiftConfig       `json:"shiftConfig"`
}

func (*Bl3Config) NewVipCodeMap

func (conf *Bl3Config) NewVipCodeMap() VipCodeMap

type HttpClient

type HttpClient struct {
	Client
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient() (*HttpClient, error)

func (*HttpClient) Do

func (client *HttpClient) Do(req *Request) (*HttpResponse, error)

func (*HttpClient) Get

func (client *HttpClient) Get(url string) (*HttpResponse, error)

func (*HttpClient) Head

func (client *HttpClient) Head(url string) (*HttpResponse, error)

func (*HttpClient) Post

func (client *HttpClient) Post(url, contentType string, body io.Reader) (*HttpResponse, error)

func (*HttpClient) PostJson

func (client *HttpClient) PostJson(url string, data interface{}) (*HttpResponse, error)

func (*HttpClient) SetDefaultHeader

func (client *HttpClient) SetDefaultHeader(k, v string)

type HttpResponse

type HttpResponse struct {
	Response
}

func (*HttpResponse) BodyAsHtmlDoc

func (response *HttpResponse) BodyAsHtmlDoc() (*goquery.Document, error)

func (*HttpResponse) BodyAsJson

func (response *HttpResponse) BodyAsJson() (*gojsonq.JSONQ, error)

type ShiftCodeMap

type ShiftCodeMap map[string][]string

func (ShiftCodeMap) Contains

func (codeMap ShiftCodeMap) Contains(code, platform string) bool

type ShiftConfig

type ShiftConfig struct {
	CodeListUrl   string `json:"codeListUrl"`
	CodeInfoUrl   string `json:"codeInfoUrl"`
	UserInfoUrl   string `json:"userInfoUrl"`
	GameCodename  string `json:"gameCodename"`
	AllowInactive bool
}

type StringSet

type StringSet map[string]struct{}

func (StringSet) Add

func (set StringSet) Add(s string)

type VipActivity

type VipActivity struct {
	Title string `json:"title"`
	Link  string `json:"link_href"`
}

type VipCodeMap

type VipCodeMap map[string]StringSet

func (VipCodeMap) Add

func (v VipCodeMap) Add(codeType, code string)

func (VipCodeMap) Diff

func (v VipCodeMap) Diff(other VipCodeMap) VipCodeMap

type VipConfig

type VipConfig struct {
	CodeListUrl          string            `json:"codeListUrl"`
	CodeListRowSelector  string            `json:"codeListRowSelector"`
	CodeListInvalidRegex string            `json:"codeListInvalidRegex"`
	CodeListCheckIndex   int               `json:"codeListCheckIndex"`
	CodeListCodeIndex    int               `json:"codeListCodeIndex"`
	CodeListTypeIndex    int               `json:"codeListTypeIndex"`
	CodeTypeUrlMap       map[string]string `json:"codeTypeUrlMap"`
}

func (*VipConfig) DetectCodeTypes

func (conf *VipConfig) DetectCodeTypes(s string) []string

func (*VipConfig) GetCodeTypes

func (conf *VipConfig) GetCodeTypes() []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL