Coder Social home page Coder Social logo

t11c-reset's Introduction

t11c-reset

This command line tool provides a quick and easy way to force reconnect the modem on the Zyxel AMG1302-T11C ADSL wireless router. All interaction is carried out by forging HTTP requests made by the configuration UI.

Usage

Full usage instructions are available by running:

t11c-reset help

To immediately disconnect and reconnect the modem:

t11c-reset reconnect --username=admin --password=hunter2 --hostname=192.168.1.1

Configuration

Login credentials and the hostname may be provided via a YAML configuration file. The tool will attempt to automatically load from $HOME/.t11c-reset.yaml, if it exists.

username: AzureDiamond
password: hunter2
hostname: 192.168.1.1

Build

This project uses Go Modules, so compilation is extremely straightforward. Go 1.15 or a compatible release is required.

go build # By default will create the executable t11c-reset

SystemD Usage

To run as a service on a Linux machine, you can use the provided SystemD unit file in the systemd directory (supported by the majority of recent mainstream distributions).

To install, first install the built executable somewhere sensible on the machine, e.g.

sudo cp t11c-reset /usr/local/bin/t11c-reset

Then install the systemd unit file:

sudo cp systemd/t11c-reset.service /etc/systemd/system/t11c-reset.service
sudo chmod 644 /etc/systemd/system/t11c-reset.service

You should consider running the service as a non-privileged user.

And create a configuration file with the login details (or edit the unit file to configure via environment/command line):

# Create this file by hand. See the "Configuration" section above for details
sudo vim /usr/local/etc/t11c-reset.yaml

Finally, enable the service on boot, and start it:

sudo systemctl enable t11c-reset
sudo systemctl start t11c-reset

Once running, you can check the logs using journalctl:

journalctl -u t11c-reset -f

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.