GithubHelp home page GithubHelp logo

aternosapi's Introduction

aternosAPI

Non Official Aternos API written in Node.js

Aternos is a legitimate corporation and its benefits comes with ads in the web page. Please use it with responsibility.

Installation

git clone https://<url>
cd aternosAPI
npm install

Configuration

Create .env file in aternosAPI directory.

ATERNOS_USER=your_user
ATERNOS_PASSWORD=your_password

Full .env file looks like this.

ATERNOS_USER=your_user
ATERNOS_PASSWORD=your_password
HOST_NAME=localhost
PORT=3000
API_PASSWORD=strong_password
TOKEN_KEY=vulnerable_token_key
PUBLIC_START=false
PUBLIC_INFO=false
DEBUG=false
  • ATERNOS_USER: Required. Aternos account user.
  • ATERNOS_PASSWORD: Required. Aternos account password.
  • HOST_NAME: Rest mode only. IP or Hostname of the API. Default "localhost".
  • PORT: Rest mode only. Port of the API. Default "3000".
  • API_PASSWORD: Rest mode only. Required password for get the Token. If not set, entire API is public.
  • TOKEN_KEY: Rest auth mode only. Access Token for access. Default "vulnerable_token_key".
  • PUBLIC_START: Rest auth mode only. Disable auth for Start route only. If server is started, this route do nothing. Default "false".
  • PUBLIC_INFO: Rest auth mode only. Disable auth for Info and Gamedig. Default "false".
  • DEBUG: If true show browser navigation. Defaul "false".

Usage

If you only have one server, use one of these commands:

npm run rest #for start the rest api, visit printed address for paths
npm run start #starts the server
npm run start-wait #starts the server and wait the queue for confirm
npm run stop #stop the server
npm run restart #restart the server
npm run info #get the name, info and queue
npm run gamedig #get gamedig complete info

If you have multiple servers, you can add --id param:

npm run start -- --id=myserver

or full usage:

node src/index.js --[rest, start [--wait], stop, restart, info, gamedig] [--id=<server id or name>]

Rest API

Summary can be found on root path.

If the API is password protected:

  • Post at /login with json body {"password":"api_password"} for get the token.
  • Add to the header "x-access-token" with the token.
  • Token is only valid for your IP address.

aternosapi's People

Contributors

hartontw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aternosapi's Issues

Error 403

I got this error "No node found for selector: #user". So I turned headless to false. And I get this error from Aternos "Sorry, an error occurred!" with ID: 403. I've seen the same issue on other repositories too and they can't fix it either.
image
image

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.