Git Product home page Git Product logo

autoauth's Introduction

AutoAuth

Banner

Go Report Card GoDoc codebeat badge GolangCI fuzzit Build Status codecov Sourcegraph GitHub tag Docker Repository GitHub

AutoAuth is Automatic Internet Portal Authentication CLI written in Golang ๐Ÿ›ฐ๐Ÿ›ฐ

๐Ÿ“š Table of contents

โ› Installation

Go get

~$ go get -u github.com/pepodev/autoauth

Docker

~$ docker run --name autoauth -d -v ${pwd}/autoauth.yml:/autoauth.yml pepodev/autoauth

Note: docker network need ability to access external internet

Complied binary (coming soon too)

Check release page to see available binary file.

๐Ÿ“ƒ Example Preset file

# Example preset file for university KMITL wifi portal
autoauth:
  name: KMITL
  encrypted: false

  login:
    endpoint: https://connect.kmitl.ac.th:8445/PortalServer/Webauth/webAuthAction!login.action
    method: POST
    header:
      - User-Agent:AutoAuth
    body:
      - [email protected]
      - password=s3cr3t_p@ssw0rd
      - authLan=en
      - validCode=200
      - hasValidateNextUpdatePassword=true
      - browserFlag=en
    timeout: 5

  logout:
    endpoint: https://connect.kmitl.ac.th:8445/PortalServer/Webauth/webAuthAction!logout.action
    method: POST
    header:
      - User-Agent:AutoAuth
      - X-XSRF-TOKEN:{token}
    timeout: 5

  heartbeat:
    endpoint: http://clients3.google.com/generate_204 # Recommended endpoint for heartbeat
    method: GET
    header:
      - User-Agent:AutoAuth
    interval: 5
    timeout: 5
    retry: 3

  save:
    - token

Note: The config also support in various format include json, toml, hcl, envfile. It's powered by Viper

๐Ÿ“• CLI Usage

Basic usage run this command to Start Autoauth

~$ autoauth start -f ./autoauth.yml

Or use Help command to see, What's Autoauth CLI can do for you.

~$ autoauth --help

Help Command

๐Ÿ“ Todo

  • Add docker image

  • Add complied binary file

  • Save key from response for use in another purpose

  • Add retries rule

  • Create preset file from CLI

  • Decrypt with key for read secret variables from preset file

  • Implement timeout from preset file

  • Write unit tests

  • Write benchmark

  • Write documents

  • Create GUI

๐Ÿ›’ Dependencies

  • Cobra A Commander for modern Go CLI interactions

  • Viper Go configuration with fangs

  • Fasthttp Used for httpclient. Zero memory allocations. Up to 10x faster than net/http

  • Go-ps Find, list, and inspect processes from Go (golang).

๐Ÿ•ต๏ธโ€โ™€๏ธ Contributing

Yes, Thanks for all contributor.

If you have any question or issues also check this page.

autoauth's People

Contributors

flukedev8 avatar pepodev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

godsin

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.