|
|
@@ -0,0 +1,320 @@
|
|
|
+@using economy.Models.Whois.Domain
|
|
|
+@using economy.Models.Whois.IP
|
|
|
+
|
|
|
+@{
|
|
|
+ ViewData["Title"] = "Whois IP/Doamin 조회";
|
|
|
+}
|
|
|
+
|
|
|
+<div id="whois" class="container">
|
|
|
+ <h3>@ViewData["Title"]</h3>
|
|
|
+ <br/>
|
|
|
+ <form id="fSearch" method="post" accept-charset="UTF-8" rel="search" autocomplete="off" asp-controller="Whois" asp-action="Search">
|
|
|
+ <div class="row justify-content-center">
|
|
|
+ <div class="col col-md-4">
|
|
|
+ <div class="input-group">
|
|
|
+ <input type="text" name="query" class="form-control" value="@ViewBag?.Query" placeholder="예) 도메인 또는 IP" aria-label="예) 도메인 또는 IP" aria-describedby="IP or Domain Search" autofocus maxlength="120" />
|
|
|
+ <button class="btn btn-outline-danger" type="submit"><i class="bi bi-search"></i></button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ @if (@ViewBag?.Query is not null && @ViewBag.isError)
|
|
|
+ {
|
|
|
+ <div class="no-data">
|
|
|
+ 조회 결과가 없습니다.
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ @if (ViewBag.result is not null && ViewBag.result.Result.ResultCode == 10000)
|
|
|
+ {
|
|
|
+ <div class="result w-75 m-auto mt-3 bg-transparent">
|
|
|
+ @switch(ViewBag.type)
|
|
|
+ {
|
|
|
+ // 도메인 검색
|
|
|
+ case 1:
|
|
|
+ var result = (economy.Models.Whois.Domain.Response)ViewBag.result;
|
|
|
+
|
|
|
+ <table class="table table-bordered">
|
|
|
+ <caption class="caption-top">
|
|
|
+ <h5>@result.Whois.KrDomain.Name</h5>
|
|
|
+ </caption>
|
|
|
+ <colgroup>
|
|
|
+ <col width="30%"/>
|
|
|
+ <col width="*"/>
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>등록인 이름</th>
|
|
|
+ <td>@result.Whois.KrDomain.RegName<br />(@result.Whois.KrDomain.ERegName)</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>관리자 이름</th>
|
|
|
+ <td>@result.Whois.KrDomain.AdminName<br />(@result.Whois.KrDomain.EAdminName)</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>관리자 이메일</th>
|
|
|
+ <td>@(result.Whois.KrDomain?.AdminEmail ?? "-")</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>관리자 연락처</th>
|
|
|
+ <td>@(result.Whois.KrDomain?.AdminPhone ?? "-")</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>등록일자</th>
|
|
|
+ <td>@result.Whois.KrDomain.RegDate</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>최근 정보 변경일</th>
|
|
|
+ <td>@result.Whois.KrDomain.LastUpdatedDate</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>만료일자</th>
|
|
|
+ <td>@result.Whois.KrDomain.EndDate</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>정보공개여부</th>
|
|
|
+ <td>@result.Whois.KrDomain.InfoYN</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>등록대행자</th>
|
|
|
+ <td>
|
|
|
+ <a href="@result.Whois.KrDomain.AgencyUrl" target="_blank" rel="author">@result.Whois.KrDomain.Agency</a><br />(@result.Whois.KrDomain.EAgency)
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>등록정보 보호</th>
|
|
|
+ <td>@result.Whois.KrDomain.DomainStatus</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>DNSSEC</th>
|
|
|
+ <td>
|
|
|
+ @if (@result.Whois.KrDomain.DNSSEC == "unsigned")
|
|
|
+ {
|
|
|
+ <text>미서명</text>
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ <text>서명</text>
|
|
|
+ }
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <!-- DNS 정보 -->
|
|
|
+ <table class="table table-bordered">
|
|
|
+ <colgroup>
|
|
|
+ <col width="30%" />
|
|
|
+ <col width="*" />
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ @if (@result.Whois != null
|
|
|
+ && @result.Whois.KrDomain != null
|
|
|
+ && @result.Whois.KrDomain.NameServers != null
|
|
|
+ && @result.Whois.KrDomain.IPAddresses != null)
|
|
|
+ {
|
|
|
+ int count = Math.Min(@result.Whois.KrDomain.NameServers.Count, @result.Whois.KrDomain.IPAddresses.Count);
|
|
|
+ for (int i = 0; i < count; i++)
|
|
|
+ {
|
|
|
+ <tr>
|
|
|
+ <th colspan="2">@($"{i + 1}차 네임서버")</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>호스트 이름</td>
|
|
|
+ <td>@result.Whois.KrDomain.NameServers[i]</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>IP 주소</td>
|
|
|
+ <td>@result.Whois.KrDomain.IPAddresses[i]</td>
|
|
|
+ </tr>
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ <tr>
|
|
|
+ <td colspan="2">네임서버 정보가 없습니다.</td>
|
|
|
+ </tr>
|
|
|
+ }
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ break;
|
|
|
+
|
|
|
+ // IP 검색
|
|
|
+ case 2:
|
|
|
+ var IP = (economy.Models.Whois.IP.Response)ViewBag.result;
|
|
|
+
|
|
|
+ <h5>@IP.Whois.Query</h5>
|
|
|
+
|
|
|
+ <small>IP 구분 : @IP.Whois.QueryType</small>
|
|
|
+
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <small>등록대행사 : @IP.Whois.Registry</small>
|
|
|
+
|
|
|
+ <br />
|
|
|
+
|
|
|
+ <small>국가 코드 : @IP.Whois.CountryCode</small>
|
|
|
+
|
|
|
+ <br />
|
|
|
+ <hr/>
|
|
|
+
|
|
|
+ <table class="table table-bordered">
|
|
|
+ <caption class="caption-top ps-2">
|
|
|
+ 조회하신 IPv4 주소는 한국인터넷진흥원으로 부터 아래의 관리대행자에게 할당되었으며, 할당 정보는 다음과 같습니다.
|
|
|
+ </caption>
|
|
|
+ <colgroup>
|
|
|
+ <col width="30%" />
|
|
|
+ <col width="*" />
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>서비스 명</th>
|
|
|
+ <td>@IP.Whois.Korean.ISP.NetInfo.ServName</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>IPv4</th>
|
|
|
+ <td>@IP.Whois.Korean.ISP.NetInfo.Range</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>
|
|
|
+ CIDR <i class="bi bi-info-circle" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="각각 CIDR(클래스 없는 도메인 라우팅, Classless Inter-Domain Routing) 표기법입니다. CIDR 표기법은 네트워크를 나누는 서브넷 마스크를 나타냅니다. 네트워크가 얼마나 세분화되어 있는지 나타내며, 숫자가 클수록 서브넷이 작아지고, 사용 가능한 IP 주소 수도 줄어듭니다."></i>
|
|
|
+ </th>
|
|
|
+ <td>@IP.Whois.Korean.ISP.NetInfo.Prefix</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>기관 ID</th>
|
|
|
+ <td>
|
|
|
+ @IP.Whois.Korean.ISP.NetInfo.OrgID
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>기관 명</th>
|
|
|
+ <td>@IP.Whois.Korean.User.NetInfo.OrgName<br />(@IP.Whois.English.ISP.NetInfo.OrgName)</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>주소</th>
|
|
|
+ <td>
|
|
|
+ (@IP.Whois.Korean.ISP.NetInfo.ZipCode) @IP.Whois.Korean.ISP.NetInfo.Addr<br />(@IP.Whois.English.ISP.NetInfo.ZipCode) @IP.Whois.English.ISP.NetInfo.Addr
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>할당일자</th>
|
|
|
+ <td>@IP.Whois.Korean.ISP.NetInfo.RegDate</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <table class="table table-bordered">
|
|
|
+ <caption class="caption-top ps-2">
|
|
|
+ 위의 관리대행자로 부터 아래의 사용자에게 할당되었으며, 할당 정보는 다음과 같습니다.
|
|
|
+ </caption>
|
|
|
+ <colgroup>
|
|
|
+ <col width="30%" />
|
|
|
+ <col width="*" />
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>네트워크 유형</th>
|
|
|
+ <td>@IP.Whois.Korean.User.NetInfo.NetType</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>IPv4</th>
|
|
|
+ <td>@IP.Whois.Korean.User.NetInfo.Range</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>CIDR <i class="bi bi-info-circle" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="각각 CIDR(클래스 없는 도메인 라우팅, Classless Inter-Domain Routing) 표기법입니다. CIDR 표기법은 네트워크를 나누는 서브넷 마스크를 나타냅니다. 네트워크가 얼마나 세분화되어 있는지 나타내며, 숫자가 클수록 서브넷이 작아지고, 사용 가능한 IP 주소 수도 줄어듭니다."></i></th>
|
|
|
+ <td>@IP.Whois.Korean.User.NetInfo.Prefix</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>기관 ID</th>
|
|
|
+ <td>@IP.Whois.Korean.User.NetInfo.OrgID</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>기관 명</th>
|
|
|
+ <td>@IP.Whois.Korean.User.NetInfo.OrgName<br />(@IP.Whois.English.ISP.NetInfo.OrgName)</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>주소</th>
|
|
|
+ <td>(@IP.Whois.Korean.User.NetInfo.ZipCode) @IP.Whois.Korean.User.NetInfo.Addr</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>할당일자</th>
|
|
|
+ <td>@IP.Whois.Korean.User.NetInfo.RegDate</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <table class="table table-bordered">
|
|
|
+ <caption class="caption-top ps-2">
|
|
|
+ @IP.Whois.Korean.ISP.TechContact.Name
|
|
|
+ </caption>
|
|
|
+ <colgroup>
|
|
|
+ <col width="30%" />
|
|
|
+ <col width="*" />
|
|
|
+ </colgroup>
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <th>전자주소</th>
|
|
|
+ <td>@IP.Whois.Korean.ISP.TechContact.Email</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>연락처</th>
|
|
|
+ <td>@IP.Whois.Korean.ISP.TechContact.Phone</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ else if (ViewBag.result is not null && ViewBag.result.Result.ResultCode != 10000)
|
|
|
+ {
|
|
|
+ <blockquote class="alert alert-danger mt-3" role="alert">
|
|
|
+ @switch (ViewBag.type)
|
|
|
+ {
|
|
|
+ // 도메인 검색
|
|
|
+ case 1:
|
|
|
+ var domain = (economy.Models.Whois.Domain.Response)ViewBag.result;
|
|
|
+ @domain.Result.ResultMsg;
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ var ip = (economy.Models.Whois.IP.Response)ViewBag.result;
|
|
|
+ @ip.Result.ResultMsg;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ </blockquote>
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ <div class="row mt-2">
|
|
|
+ <div class="col text-center">
|
|
|
+ <small>국가 인터넷주소관리기관인 <a href="https://xn--c79as89aj0e29b77z.xn--3e0b707e/" target="_blank">한국인터넷진흥원</a>의 API를 사용합니다.</small>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+ <blockquote class="text-center">
|
|
|
+ <strong>도메인 검색 예시</strong><br />
|
|
|
+ <ul class="list-inline">
|
|
|
+ <li class="list-inline-item">kisa.or.kr,</li>
|
|
|
+ <li class="list-inline-item">ns0.kisa.or.kr,</li>
|
|
|
+ <li class="list-inline-item">한국인터넷진흥원.kr</li>
|
|
|
+ </ul>
|
|
|
+
|
|
|
+ <strong>IP 검색 예시</strong><br />
|
|
|
+ <ul class="list-inline">
|
|
|
+ <li class="list-inline-item">202.30.50.51,</li>
|
|
|
+ <li class="list-inline-item">2001:02B8::/32</li>
|
|
|
+ </ul>
|
|
|
+ </blockquote>
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </form>
|
|
|
+</div>
|
|
|
+
|
|
|
+@section Scripts {
|
|
|
+ <script src="~/js/whois.js" asp-append-version="true"></script>
|
|
|
+}
|
|
|
+@section Styles {
|
|
|
+ <link href="~/css/style.css" rel="stylesheet" asp-append-version="true" />
|
|
|
+}
|