https://github.com/pepodev/autoauth
Automatic Internet Portal Authentication CLI written in Go 🛰🛰
https://github.com/pepodev/autoauth
authentication automation command-line-tool golang hacktoberfest made-with-love pepodev
Last synced: 13 days ago
JSON representation
Automatic Internet Portal Authentication CLI written in Go 🛰🛰
- Host: GitHub
- URL: https://github.com/pepodev/autoauth
- Owner: PePoDev
- License: mit
- Archived: true
- Created: 2019-11-11T08:08:53.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-20T07:48:37.000Z (over 2 years ago)
- Last Synced: 2024-06-20T13:36:52.360Z (over 1 year ago)
- Topics: authentication, automation, command-line-tool, golang, hacktoberfest, made-with-love, pepodev
- Language: Go
- Homepage: https://pepo.dev/autoauth/
- Size: 793 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoAuth

[](https://goreportcard.com/report/github.com/pepodev/autoauth)
[](http://godoc.org/github.com/PePoDev/autoauth)
[](https://codebeat.co/projects/github-com-pepodev-autoauth-master)
[](https://golangci.com)
[](https://app.fuzzit.dev/orgs/pepodev-gh/dashboard)
[](https://travis-ci.com/PePoDev/autoauth)
[](https://codecov.io/gh/PePoDev/autoauth)
[](https://sourcegraph.com/github.com/PePoDev/autoauth?badge)
[](https://github.com/PePoDev/autoauth/releases/latest)
[](https://hub.docker.com/r/pepodev/autoauth)
[](https://github.com/PePoDev/autoauth/blob/master/LICENSE)
**AutoAuth** is Automatic Internet Portal Authentication CLI written in Golang 🛰🛰
## 📚 Table of contents
- [Installation](#-installation)
- [Example Preset](#-example-preset-file)
- [Usage](#-cli-usage)
- [Todo](#-todo)
- [Dependencies](#-dependencies)
- [Contributing](#️️-contributing)
## ⛏ Installation
### Go get
```console
~$ go get -u github.com/pepodev/autoauth
```
### Docker
```console
~$ 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](https://github.com/PePoDev/autoauth/releases) page to see available binary file.
## 📃 Example Preset file
```yml
# 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:
- userName=59050xxx@kmitl.ac.th
- 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](https://github.com/spf13/viper)
## 📕 CLI Usage
Basic usage run this command to **Start** Autoauth
```console
~$ autoauth start -f ./autoauth.yml
```
Or use **Help** command to see, What's Autoauth CLI can do for you.
```console
~$ autoauth --help
```

## 📝 Todo
- [x] ~~Add docker image~~
- [ ] Add complied binary file
- [ ] Save key from response for use in another purpose
- [x] ~~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](https://github.com/spf13/cobra) A Commander for modern Go CLI interactions
- [Viper](https://github.com/spf13/viper) Go configuration with fangs
- [Fasthttp](https://github.com/valyala/fasthttp) Used for httpclient. Zero memory allocations. Up to 10x faster than net/http
- [Go-ps](https://github.com/mitchellh/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](https://github.com/PePoDev/autoauth/issues/new) page.