All Projects → authq → captive-login

authq / captive-login

Licence: GPL-3.0 License
Captive-portal login utility for headless environments written in pure bash.

Programming Languages

shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to captive-login

refluxion
Refluxion -- MITM WPA attacks tool
Stars: ✭ 25 (+8.7%)
Mutual labels:  captive-portal, captiveportal
Daily Signin
网站签到脚本
Stars: ✭ 52 (+126.09%)
Mutual labels:  login, headless
saleor
A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and React.
Stars: ✭ 15,824 (+68700%)
Mutual labels:  headless
auth-flow-react-apollo-saga
Full stack login/register flow with React, Apollo, Redux, Redux-saga and MongoDB.
Stars: ✭ 22 (-4.35%)
Mutual labels:  login
Meteor-Remember-Me
Meteor accounts extension with remember me functionality
Stars: ✭ 13 (-43.48%)
Mutual labels:  login
grav-plugin-login
Grav Login Plugin
Stars: ✭ 40 (+73.91%)
Mutual labels:  login
example-node-and-browser-qunit-ci
Example project with continuous integration for linting and cross-browser testing of isomorphic JavaScript.
Stars: ✭ 18 (-21.74%)
Mutual labels:  headless
Pepaverse
Pepaverse is an open source social network build with nodejs, mongoDB, passportjs and socket.io
Stars: ✭ 16 (-30.43%)
Mutual labels:  login
agilitycms-nextjs-starter
A sample Next.js starter site that uses Agility CMS and aims to be a foundation for building fully static sites using Next.js and Agility CMS.
Stars: ✭ 19 (-17.39%)
Mutual labels:  headless
fgo-bot
fgo自动刷图脚本
Stars: ✭ 52 (+126.09%)
Mutual labels:  automated
be.camp
Open source website for the beCamp unconference in Charlottesville, VA
Stars: ✭ 16 (-30.43%)
Mutual labels:  headless
spring-boot-mongodb-security-angular8
Spring Boot, Security, MongoDB, Angular 8: Build Authentication
Stars: ✭ 17 (-26.09%)
Mutual labels:  login
TriTan-CMS
TriTan CMS is a developer centric content management framework that allows you to go completely headless or nearly headless. With the mighty TriTan, you can build amazing RESTful applications and robust websites.
Stars: ✭ 19 (-17.39%)
Mutual labels:  headless
CockyGrabber
C# library for the collection of browser information such as cookies, logins, and more
Stars: ✭ 46 (+100%)
Mutual labels:  login
yoti-java-sdk
The Java SDK for interacting with the Yoti Platform
Stars: ✭ 13 (-43.48%)
Mutual labels:  login
Chocolater
Chocolater is simply a PowerShell code generator and it was conceived in order to facilitate the selection and installation of your favorite applications in one go.
Stars: ✭ 26 (+13.04%)
Mutual labels:  automated
igFame
📷 igFame - Tool for automated Instagram interactions [PHP]
Stars: ✭ 16 (-30.43%)
Mutual labels:  automated
chr-eve-ng
Repository contain LAB's for Mikrotik trainings and helpers for installing CHR into eve-ng.
Stars: ✭ 28 (+21.74%)
Mutual labels:  mikrotik
sign-in-with-apple-js-node-example
Sign in with Apple using Apple JS and REST API
Stars: ✭ 48 (+108.7%)
Mutual labels:  login
verdaccio-github-oauth-ui
📦🔐 GitHub OAuth plugin for Verdaccio
Stars: ✭ 56 (+143.48%)
Mutual labels:  login

CircleCI Docker Automated build Docker Build Status Docker layers

clogin(1) -- captive-portal login utility

SYNOPSIS

Usage: clogin login|logout|loop|test [--help] [OPTION...]

Login:

clogin login -u test -p test

Test connectivity:

clogin test

Continuesly check login state:

clogin loop -u test -p test

Logout:

clogin logout

INSTALL

wget https://raw.githubusercontent.com/authq/captive-login/master/bin/clogin
chmod +x clogin
sudo mv clogin /usr/local/bin

DESCRIPTION

At Amirkabir university, we have mikrotik powered captive-portal for internet access. This makes some challenges when a persistent internet connection is needed in headless devices and lab servers.

This utility automates captive-portal login proccess. I've tried to generalize all params as possible so it can be used in similar environments, at least with other mikrotik captive-portals.

Behind the scenes, login process is achived by sending a HTTPS POST request to /login endpoint of captive-portal containing username and password fields in body. Logout is done by sending a GET request to /logout endpoint. Both success if HTTP response code is 302 (Mikrotik spec). The connectivity test successes when GET requst to test url is 200. For detailed info of how this script works, see bin/clogin.

Supported options:

  • -f, --conf - Path to config file (Defaults to clogin.conf)
  • -l, --log-file <val> - Set log file (Defaults to /dev/stderr)
  • -u, --username <val> - Set login username
  • -p, --password <val> - Set login password
  • --allow-empty - Allow using empty username and password
  • -c, --client <val> - Set http client to make requests. (Possible values: auto|curl|wget)
  • --base <val> - Set http client base url (Defauts to https://login.aut.ac.ir)
  • --login-endpoint <val> - Set login endpoint (Defaults to /login)
  • --logout-endpoint <val> - Set logout endpoint (Defaults to /logout)
  • --test-url <val> - Set connectivity test url (Default to http://icanhazip.com)
  • --loop-interval <val> - Set loop interval in seconds (Defaults to 1800 = 30 minutes)
  • -h, --help - Display help message
  • -v, --version - Display version
  • -x, --debug - Debug mode. Shows all internal invoked commands

CONFIG FILE

Config files at the paths of /usr/local/etc/clogin.conf, /etc/clogin.conf and ~/.clogin.conf will be applied if readable in order before parsing options. For a complete example see etc/clogin.conf.

USERNAME=foo
PASSWORD=bar

When CONFIG_FILE environment variable or -f, --conf options provided it will be applied after parsing options.

ENVIRONMENT VARIABLES

It is possible to use environment variables instead of arguments to configure clogin.

Supported environment variables:

  • CONFIG_FILE
  • LOG_FILE
  • USERNAME
  • PASSWORD
  • ALLOW_EMPTY
  • HTTP_CLIENT
  • BASE_URL
  • LOGIN_ENDPOINT
  • LOGOUT_ENDPOINT
  • SUCCESS_CODE
  • TEST_URL
  • TEST_SUCCESS_CODE
  • LOOP_INTERVAL

DOCKER IMAGE

An alpine based docker image (~4MB) is available for ease of use and deployment.

docker pull authq/captive-login
docker run -it --rm  -e USERNAME="test" -e PASSWORD="test" authq/clogin loop

DEVELOPMENT

This project uses BATS for automated testing, Dockerfile for packaging and Makefile for development workflow.

Available Makefile commands:

  • make test - Run BATS tests
  • make install - Installs clogin utility to /usr/local/bin
  • make docker-build - Build docker image
  • make docker - Build and test docker image functionality

Feel free forking this repository and making PRs for features and fixes :)

RELATED PROJECTS

  • Reyhoon Hotspot Login - A simple http client written in go to log us in with less pain and effort.
  • Mili - Mili is an open source tool for auto login hotspot pages! (MacOS + Linux)

LICENSE

Copyright (C) 2018 Pooya Parsa [email protected]

This work is released under the GNU General Public License v3.0. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].