Coder Social home page Coder Social logo

mikrotikcaptiveautologin's Introduction

Mikrotik Captive Autologin

This Node.js script automates logging into Mikrotik captive portal.

To add more security, Mikrotik captive portal appends some random bytes and encodes the transmitted password to MD5. This script retrieves the bytes, appends and encodes the password, then sends it to the captive portal.

Configuration

Install this package with NPM:

npm install -g mikrotik-captive-autologin

Create $HOME/.config/mikrotik-captive-autologin directory and create config.json file inside it, and fill it like this:

[
    {
        "ssid": "<wifi name>",
        "hostname": "<captive portal hostname without http://>",
        "username": "<your username>",
        "password": "<your password>"
    }
]

You can add multiple configurations for different SSIDs.

Then run the script.

mikrotik-captive-autologin

Android Users

If you use this script on Android, you have to grant DUMP permission to the app that executes this script first.

adb shell pm grant <app package name> android.permission.DUMP

Contributors

Thank you so much to Iyxan23 for the idea and helping me out in a lot of things, since my JavaScript and Node.js knowledge is a bit rusty (pun intended).

License

This script is licensed under the MIT License, © 2022 Aldo Adirajasa Fathoni.

md5.js is licensed under the BSD License, © 1999-2002 Paul Johnston.

wifi-name is licensed under the MIT License, © 2015-2017 Kevin Mårtensson.

mikrotikcaptiveautologin's People

Contributors

fathonix avatar iyxan23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

iyxan23

mikrotikcaptiveautologin's Issues

Rewrite in a compiled language and use QuickJS for md5.js?

This project was intended to be written in a language with minimal dependency, but the first time we wrote this we didn't find a compatible MD5 implementation. So we relied on Node.js to run md5.js.

Recently, I found a tiny JS runtime called QuickJS. It implements most of ES2020 (which is way more than we need) and only adds ~200KB when embedded into a C program. Would be nice to have a statically compiled, lightweight single executable that could run without any external dependency.

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.