Advent of Code Input Loader, provide a session cookie and a problem date, returns a string or []byte of the input

Advent of Code Get (aocget) Go Reference

A small lib to download your puzzle input for a given day.

Uses your session token to authenticate to obtain your personalized input.

Getting your Session Token

  1. Login to Advent of Code
  2. Open your browser's DevTools (usually F12)
  3. Head over to your cookies
  4. Copy the value of the session cookie

Example

package main

import (
	"fmt"
	"github.com/Zyian/aocget"
	"os"
)

func main() {
	aoc := aocget.NewClient(os.Getenv("SESSION_TOKEN"))
	i, err := aoc.DownloadInputString(2021, 1)
	if err != nil {
        fmt.Printf("unable to download input: %v\n", err)
		os.Exit(1)
	}

	fmt.Println(i)
}
Owner
Adrian
System Engineer by day, Savage raider by night
Adrian
Similar Resources

Straightforward HTTP session management

sessionup 🚀 Simple, yet effective HTTP session management and identification package Features Effortless session management: Initialization. Request

Oct 10, 2022

Go (lang) HTTP session authentication

Go Session Authentication See git tags/releases for information about potentially breaking change. This package uses the Gorilla web toolkit's session

Dec 22, 2022

Validate Django auth session in Golang

GoDjangoSession Valid for django 3.0.5 Usage: package main import ( "encoding/base64" "fmt" "session/auth" "github.com/Kuzyashin/GoDjangoSession"

Aug 23, 2022

Auth Middleware for session & white-listed routing

Auth Middleware for session & white-listed routing

Nov 4, 2021

Ginx - Evilginx2 - A man-in-the-middle attack framework used for phishing login credentials along with session cookies

Ginx - Evilginx2 - A man-in-the-middle attack framework used for phishing login credentials along with session cookies

evilginx2 is a man-in-the-middle attack framework used for phishing login creden

Mar 19, 2022

Lastweek - Given a username and/or GitHub access token, this tool will provide a report of the work done by the user last week

lastweek Given a username and/or GitHub access token, this tool will provide a r

Oct 1, 2022

Example App written in Golang for provide AuthZ/N using JWT

RCK Auth Application Example App written in Golang for provide Authentication & Authorization using Json Web Tokens. Run with Docker / Podman Run a Po

Feb 25, 2022

A specification compliant implementation of RFC7636 - Proof Key for Code Exchange (PKCE) for Go

pkce implements the client side of RFC 7636 "Proof Key for Code Exchange by OAuth Public Clients" (PKCE) to enable the generation of cryptographically secure and specification compliant code verifiers and code challenges

Dec 20, 2022

Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.

❗ Cache package has been moved to libcache repository Go-Guardian Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to

Dec 23, 2022
Package gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends.

sessions gorilla/sessions provides cookie and filesystem sessions and infrastructure for custom session backends. The key features are: Simple API: us

Dec 28, 2022
Shows the calender for current month according to the date input by the user.

#Calender This program shows the Calender of a month according to the date input by the user. ##Sample Run Enter a date: 12/1/2022 Please find the req

Jan 12, 2022
Package gorilla/securecookie encodes and decodes authenticated and optionally encrypted cookie values for Go web applications.

securecookie securecookie encodes and decodes authenticated and optionally encrypted cookie values. Secure cookies can't be forged, because their valu

Dec 26, 2022
Fast, secure and efficient secure cookie encoder/decoder

Encode and Decode secure cookies This package provides functions to encode and decode secure cookie values. A secure cookie has its value ciphered and

Dec 9, 2022
Goauth - Basic username password cookie based authentication with Go Lang

goauth [WIP] Basic username password cookie based authentication with Go Lang Overview Use a Postgres DB to store Sign-in and Sign-up info Redis for c

Jan 4, 2022
Cocos2d-x texture unpacker, primarily for Cookie Run.

boofunpack Cocos2d-x texture unpacker, primarily for Cookie Run: OvenBreak and Cookie Run for Kakao/LINE (though it likely works for other .plist form

Oct 11, 2022
🍪CookieMonster is a command-line tool and API for decoding and modifying vulnerable session cookies from several different frameworks.

?? CookieMonster CookieMonster is a command-line tool and API for decoding and modifying vulnerable session cookies from several different frameworks.

Jan 8, 2023
An imaginary authentication and session tracking service that is defined in this Apiary

Userland This repository contains impelementation of "Userland" on boarding project Userland is an imaginary authentication and session tracking servi

Dec 5, 2021
HTTP Session Management for Go

SCS: HTTP Session Management for Go Features Automatic loading and saving of session data via middleware. Choice of server-side session stores includi

Jan 1, 2023
Go session management for web servers (including support for Google App Engine - GAE).

Session The Go standard library includes a nice http server, but unfortunately it lacks a very basic and important feature: HTTP session management. T

Oct 10, 2022