GithubHelp home page GithubHelp logo

ihc-tools's Introduction

IHС Tool

Инструмент командной строки для работы с IHC.ru

DNS

Результат выполнения в формате JSON.

Получить список доменов

ihc-dns.sh --list --user 'me%40example.com' --password 's3cr3T'
{
  "id": 123456,
  "domain": "example.com"
}
{
  "id": 554433,
  "domain": "some-domain.ru"
}

Получить список DNS записей домена

ihc-dns.sh --domain 'example.com' --list --user 'me%40example.com' --password 's3cr3T'
{
  "readOnly": true,
  "id": 1111111,
  "name": "",
  "type": "SOA",
  "content": "ns1.ihc.ru. info.ihc.ru. 9999999999 99999 9999 999999 9999",
  "prio": null
}
{
  "readOnly": true,
  "id": 2222222,
  "name": "",
  "type": "NS",
  "content": "ns1.ihc.ru",
  "prio": null
}
{
  "readOnly": true,
  "id": 3333333,
  "name": "",
  "type": "NS",
  "content": "ns2.ihc.ru",
  "prio": null
}
{
  "readOnly": false,
  "id": 4444444,
  "name": "_some_txt_name",
  "type": "TXT",
  "content": "SomeTxtContent",
  "prio": null
}

Добавить DNS запись

ihc-dns.sh --domain 'example.com' --add --name '_acme-challenge' --type 'TXT' --content 'SomeTxtContent' --user 'me%40example.com' --password 's3cr3T'
{
  "alert": {
    "type": "success",
    "message": "<span class='alert__msg'>Операция выполнена успешно</span>"
  },
  "data": {
    "success": true
  }
}

Редактирование DNS записи

Перед редактированием, нужно узнать id. Для примера возьмём id из примера получения списка DNS записей.

ihc-dns.sh --domain 'example.com' --edit --record '4444444' --type 'TXT' --content 'SomeTxtContent' --user 'me%40example.com' --password 's3cr3T'
{
  "alert": {
    "type": "success",
    "message": "<span class='alert__msg'>Операция выполнена успешно</span>"
  },
  "data": {
    "success": true
  }
}

Удалить DNS записи

Перед редактированием, нужно узнать id. Для примера возьмём id из примера получения списка DNS записей.

ihc-dns.sh --domain 'example.com' --delete --record '4444444' --user 'me%40example.com' --password 's3cr3T'
{
  "alert": {
    "type": "success",
    "message": "<span class='alert__msg'>запись удалена</span>"
  },
  "data": {
    "success": true
  }
}

ihc-tools's People

Contributors

voomra avatar

Watchers

 avatar

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.