From 6ac27aba7ba7cdf92667c7fb61624cf9e40cb1bf Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Wed, 14 Sep 2022 10:14:14 +0200 Subject: [PATCH] update readme --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d8af66b..88d9a2f 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ Search for aliases and hosts. ```text ./dns-search.sh +>>>>>>>>>> INFOBLOX DNS SEARCH v1.5 + Search for hostnames or aliases in Infoblox API It uses dns-api.sh and adds the return field for aliases. @@ -64,16 +66,6 @@ in all object types ``` -### dns-api.sh - -Low level command to access the api. It is called from ./dns-search.sh too - but can be started manually for custom api urls. - -`dns-api.sh [METHOD] URL` - -This script is used by dns-search.sh. Maybe you don't want to execute it directly. - -### Output - You maybe want to start with the lazy mode. Here you see how it accesses the api and the returned json data of each request. @@ -84,7 +76,7 @@ written to STDERR. To hide them add a 2>/dev/null to hide the comments. ```txt ./dns-search.sh www.iml.unibe.ch ; -; === INFOBLOX DNS SEARCH +; >>>>>>>>>> INFOBLOX DNS SEARCH v1.5 ; ; search for type : ; search regex : www.iml.unibe.ch @@ -106,6 +98,7 @@ written to STDERR. To hide them add a 2>/dev/null to hide the comments. ], "name": "www.iml.unibe.ch", "ttl": 300, + "use_ttl": false, "view": "default" } ] @@ -116,3 +109,49 @@ written to STDERR. To hide them add a 2>/dev/null to hide the comments. ; === DNS API :: GET /record:cname?name~=www.iml.unibe.ch&_return_fields%2B=ttl [] ``` + +### dns-api.sh + +Low level command to access the api. It is called from ./dns-search.sh too - but can be started manually for custom api urls. + +`dns-api.sh [METHOD] URL` + +This script is used by dns-search.sh ans show_ttls.sh. + +### show_ttls.sh + +This helper searches for all **host** entries that override the default +ttl value for the zone objects. + +```txt + +>>>>>>>>>> INFOBLOX DNS HELPER: TTL v1.0 + +Search for hostnames in Infoblox API and show all hosts that have an +activated custom ttl value. + +It uses dns-api.sh and adds the return field for aliases. + +SYNTAX: dns-search.sh REGEX + +REGEX string search string for a hostname. + Use a dot . to scan all hosts you are allowed to access + +``` + +Example output + +```txt +> ./show_ttls.sh . +; +; >>>>>>>>>> INFOBLOX DNS HELPER TTL v1.0 +; +; === DNS API :: GET /record:host?name~=.&_return_fields%2B=ttl,use_ttl +host1.example.com +28800 +host2.example.com +300 +``` + +Between the json data are lines starting with a semikolon - these are comments +written to STDERR. To hide them add a 2>/dev/null to hide the comments. \ No newline at end of file -- GitLab