-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
175 lines (160 loc) · 7.32 KB
/
index.html
File metadata and controls
175 lines (160 loc) · 7.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IP Address Conversion Tools</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""></script>
</head>
<body>
<header>
<h1>IP Address Conversion Tools</h1>
<nav>
<ul>
<li><a href="#ipv4-to-ipv6">IPv4 to IPv6</a></li>
<li><a href="#ipv6-to-ipv4">IPv6 to IPv4</a></li>
<li><a href="#ip-to-decimal">IP to Decimal</a></li>
<li><a href="#decimal-to-ip">Decimal to IP</a></li>
<li><a href="#binary-to-ip">Binary to IP</a></li>
<li><a href="#hex-to-ip">Hexadecimal to IP</a></li>
<li><a href="#subnet-to-cidr">Subnet Mask to CIDR</a></li>
<li><a href="#cidr-to-range">CIDR to Range</a></li>
<li><a href="#range-to-cidr">Range to CIDR</a></li>
<li><a href="#ipv6-compress">IPv6 Compress/Expand</a></li>
<li><a href="#public-private-check">Public vs. Private IP Check</a></li>
<li><a href="#asn-lookup">ASN Lookup</a></li>
<li><a href="#geo-lookup">Country and City Lookup</a></li>
</ul>
</nav>
</header>
<main>
<section id="ip-details" class="full-width-section">
<h2>Your IP Details</h2>
<div class="ip-card">
<div class="ip-loader" id="ipLoader">
<div class="loading"></div>
<p>Detecting your IP details...</p>
</div>
<div class="ip-info" id="ipInfo">
<div class="ip-info-grid">
<div class="info-item">
<span class="label">IP Address</span>
<span class="value" id="currentIp">-</span>
</div>
<div class="info-item">
<span class="label">Location</span>
<span class="value" id="location">-</span>
</div>
<div class="info-item">
<span class="label">ISP</span>
<span class="value" id="isp">-</span>
</div>
<div class="info-item">
<span class="label">Country</span>
<span class="value" id="country">-</span>
</div>
<div class="info-item">
<span class="label">Region</span>
<span class="value" id="region">-</span>
</div>
<div class="info-item">
<span class="label">Timezone</span>
<span class="value" id="timezone">-</span>
</div>
</div>
<div id="map" class="ip-map"></div>
</div>
</div>
</section>
<section id="ipv4-to-ipv6">
<h2>Convert IPv4 to IPv6</h2>
<input type="text" id="ipv4Input" placeholder="Enter IPv4 address">
<button onclick="convertIPv4ToIPv6()">Convert</button>
<p id="ipv6Output"></p>
</section>
<section id="ipv6-to-ipv4">
<h2>Convert IPv6 to IPv4</h2>
<input type="text" id="ipv6Input" placeholder="Enter IPv6 address">
<button onclick="convertIPv6ToIPv4()">Convert</button>
<p id="ipv4Output"></p>
</section>
<section id="ip-to-decimal">
<h2>Convert IP to Decimal</h2>
<input type="text" id="ipInput" placeholder="Enter IP address">
<button onclick="convertIPToDecimal()">Convert</button>
<p id="decimalOutput"></p>
</section>
<section id="decimal-to-ip">
<h2>Convert Decimal to IP</h2>
<input type="text" id="decimalInput" placeholder="Enter Decimal">
<button onclick="convertDecimalToIP()">Convert</button>
<p id="ipOutput"></p>
</section>
<section id="binary-to-ip">
<h2>Convert Binary to IP</h2>
<input type="text" id="binaryInput" placeholder="Enter Binary">
<button onclick="convertBinaryToIP()">Convert</button>
<p id="binaryOutput"></p>
</section>
<section id="hex-to-ip">
<h2>Convert Hexadecimal to IP</h2>
<input type="text" id="hexInput" placeholder="Enter Hexadecimal">
<button onclick="convertHexToIP()">Convert</button>
<p id="hexOutput"></p>
</section>
<section id="subnet-to-cidr">
<h2>Convert Subnet Mask to CIDR</h2>
<input type="text" id="subnetInput" placeholder="Enter Subnet Mask">
<button onclick="convertSubnetToCIDR()">Convert</button>
<p id="cidrOutput"></p>
</section>
<section id="cidr-to-range">
<h2>Convert CIDR to Range</h2>
<input type ="text" id="cidrInput" placeholder="Enter CIDR">
<button onclick="convertCIDRToRange()">Convert</button>
<p id="rangeOutput"></p>
</section>
<section id="range-to-cidr">
<h2>Convert Range to CIDR</h2>
<input type="text" id="rangeInput" placeholder="Enter Range">
<button onclick="convertRangeToCIDR()">Convert</button>
<p id="cidrOutput2"></p>
</section>
<section id="ipv6-compress">
<h2>Compress/Expand IPv6</h2>
<input type="text" id="ipv6CompressInput" placeholder="Enter IPv6 address">
<button onclick="compressIPv6()">Compress</button>
<button onclick="expandIPv6()">Expand</button>
<p id="ipv6CompressOutput"></p>
</section>
<section id="public-private-check">
<h2>Public vs. Private IP Check</h2>
<input type="text" id="ipCheckInput" placeholder="Enter IP address">
<button onclick="checkIPType()">Check</button>
<p id="ipCheckOutput"></p>
</section>
<section id="asn-lookup">
<h2>ASN Lookup</h2>
<input type="text" id="asnInput" placeholder="Enter IP address">
<button onclick="lookupASN()">Lookup</button>
<p id="asnOutput"></p>
</section>
<section id="geo-lookup">
<h2>Country and City Lookup</h2>
<input type="text" id="geoInput" placeholder="Enter IP address">
<button onclick="lookupGeo()">Lookup</button>
<p id="geoOutput"></p>
</section>
</main>
<footer class="footer"><h4>Developed By Pasindu Dewviman</h4></footer>
<script src="script.js"></script>
</body>
</html>