dig

How do I get a list of all subdomains of a domain? [closed]

自闭症网瘾萝莉.ら 提交于 2019-11-26 14:58:35
问题 I want to find out all the subdomains of a given domain. I found a hint which tells me to dig the authoritative Nameserver with the following option: dig @ns1.foo.bar some_domain.com axfr But this never works. Has anyone a better idea/approach 回答1: The hint (using axfr) only works if the NS you're querying (ns1.foo.bar in your example) is configured to allow AXFR requests from the IP you're using; this is unlikely, unless your IP is configured as a secondary for the domain in question.

(Easy) Add Strings LeetCode

主宰稳场 提交于 2019-11-26 12:29:33
Description: Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2 . Note: The length of both num1 and num2 is < 5100. Both num1 and num2 contains only digits 0-9 . Both num1 and num2 does not contain any leading zero. You must not use any built-in BigInteger library or convert the inputs to integer directly. Solution: import java.lang.Math; class Solution { public String addStrings(String num1, String num2) { int smaller = num2.length()>num1.length()? num1.length(): num2.length(); String sum = ""; int dig = 0; int i = num1.length()-1; int k =

在Linux上配置DNS服务

风流意气都作罢 提交于 2019-11-25 22:21:49
一、DNS服务简介 DNS 是计算机域名系统 (Domain Name System 或Domain Name Service) 的缩写,它是由解析器和域名服务器组成的。域名服务器是指保存有该网络中所有主机的域名和对应IP地址,并具有将域名转换为IP地址功能的服务器。 二、DNS安装配置 准备工作 1.配置DNS服务器所需的安装包 DNS服务程序包:bind DNS相关库:bind-libs DNS客户端:bind-utils 限制DNS在一个目录中:bind-chroot 关闭防火墙:iptables -F 关闭selinux: setenforce 0 2.编辑配置文件 全局配置文件/etc/named.conf options { listen-on port 53 { localhost; }; #括号内改为localhost是将本机ip监听在53端口上,也可以写上本机IP,注意最后的;号 listen-on-v6 port 53 { ::1; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem