Пример #1
0
        public IActionResult Index(string host = "")
        {
            NsResponse res = new NsResponse("", null, null, null, null, null, null, null, null, null, null, null);

            if (!string.IsNullOrWhiteSpace(host))
            {
                res = NsQuery.Query(host, new List <string> {
                    "a", "aaaa", "mx", "ns", "ptr", "soa", "srv", "txt", "title", "keywords", "description"
                });
            }
            return(View(res));
        }
Пример #2
0
        public IEnumerable <NsResponse> Post(ApiRequest request)
        {
            List <NsResponse> res = new List <NsResponse>();

            if (request.Host.Count() <= 1000)
            {
                Parallel.ForEach(request.Host, (host) =>
                {
                    if (!string.IsNullOrWhiteSpace(host))
                    {
                        var cur = NsQuery.Query(host, request.Request.ToList());
                        lock (res)
                        {
                            res.Add(cur);
                        }
                    }
                });
            }
            return(res);
        }