Skip to main content

Python code to login to Mikrotik WebClient without GUI

Project description

PythonWebclientWifiLogin

This is a python code to login to wifi Mikrotik Webclient for devices that has no access to GUI (such as headless Raspberry Pi, or Linux Terminal). Mikrotik Webclient is using an encription key generated randomly at some time interval, so the first thing you want to do is to search the index of the encription key.

Finding the unique key

For the example this is the encription key of Mikrotik webclient:

    function doLogin() {
    document.sendin.username.value = document.login.username.value;
    document.sendin.password.value = hexMD5('\340' + document.login.password.value + '\043\242\062\374\062\365\062\266\201\323\145\251\200\303\025\315');
    document.sendin.submit();
    return false;
    }

In this case you should find the index of:

    document.sendin.password.value = hexMD5('\340' + document.login.password.value + '\043\242\062\374\062\365\062\266\201\323\145\251\200\303\025\315');

especially:

    '\340' + document.login.password.value + '\043\242\062\374\062\365\062\266\201\323\145\251\200\303\025\315'

where:

    '\340' is the first unique key
    '\043\242\062\374\062\365\062\266\201\323\145\251\200\303\025\315' is the second unique key

Using the program

First import the module

    from python_mikrotik_login import mikrotikLogin

    mikrotikLogin("username","password","http://url") #you can leave the unique key index empty or set it manually

Arguments

    mikrotikLogin(username_string, password_string, url_string, minkey1_integer_optional, maxkey1_integer_optional, minkey2_integer_optional, maxkey2_integer_optional)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-mikrotik-login-1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_mikrotik_login-1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file python-mikrotik-login-1.tar.gz.

File metadata

  • Download URL: python-mikrotik-login-1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.3

File hashes

Hashes for python-mikrotik-login-1.tar.gz
Algorithm Hash digest
SHA256 4af0848ffef11d3f69206dff0b96ac7d4e0653cfecaf7d1a51df4871983b53fa
MD5 79f9238b29b86ba1bb54f00d1d855f74
BLAKE2b-256 43376d491251c3bfd7275f8908a2c1a5154ae8f7223f0868527e1b47930c30a3

See more details on using hashes here.

File details

Details for the file python_mikrotik_login-1-py3-none-any.whl.

File metadata

  • Download URL: python_mikrotik_login-1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.7.3

File hashes

Hashes for python_mikrotik_login-1-py3-none-any.whl
Algorithm Hash digest
SHA256 1afc608d02ece43da706bc08d3e58fd3a8300f0879d9c534db673f3590b4e34e
MD5 64f52b702419f077f97d422508338ec2
BLAKE2b-256 0a1a9a429ac29c796989c1eec7794aa12e23168a0557063a1b47c23af7cdf1a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page