├── README.md ├── index.html ├── script.js └── style.css /README.md: -------------------------------------------------------------------------------- 1 | ## Hello GitHub 👋 2 | 3 | 4 | # URL-IP 5 | - ⛅ URL-IP 是URL在线去重的在线工具 6 | - ⛅ 高效渗透计划的产物 7 | - ⛅ 在信息收集大量URL后 可快速去重、去除端口号、去除协议、批量加C段、批量加B段、提取文本域名、提取IP 8 | - 📧 意见反馈:0xShe@t00ls.net 9 | 10 | ### 使用方法: 11 | - 🍺 纯前端文件 打开即用 12 | ![image](https://user-images.githubusercontent.com/89628734/230254986-4309f070-9fd6-4301-8e01-a69843f06d9c.png) 13 | ![image](https://user-images.githubusercontent.com/89628734/230255062-4e750367-2476-4e4a-819a-fb95f66e4fc1.png) 14 | 15 | 16 | 17 | ### 更多工具 18 | - 💻 访问0xShe 网络安全导航 https://sbbbb.cn/ 19 | - 💻 在线体验 [点击进入URL-IP](http://tools.sbbbb.cn/url-ip/) 20 | 21 | 22 | 23 | 24 | ***不忘初心🔰网为民安*** 25 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | URL & IP 在线处理工具 6 | 7 | 8 | 9 | 10 | 11 |
12 |

URL & IP 在线处理工具

13 |
0xShe 网络安全导航 sbbbb.cn
14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | // 从文本框中获取 IP 列表 2 | function getIPList() { 3 | return document.getElementById("ip-list").value.trim().split(/\s+/); 4 | } 5 | 6 | // 将 IP 列表写回到文本框中 7 | function setIPList(ipList) { 8 | document.getElementById("ip-list").value = ipList.join("\n"); 9 | } 10 | 11 | // 去重 12 | function removeDuplicates() { 13 | const ipList = getIPList(); 14 | const uniqueList = Array.from(new Set(ipList)); 15 | setIPList(uniqueList); 16 | } 17 | 18 | // 清除 19 | function clearTextArea() { 20 | setIPList([]); 21 | } 22 | 23 | // 去除端口号 24 | function removePorts() { 25 | const ipList = getIPList(); 26 | const noPortList = ipList.map(ip => ip.replace(/:\d+$/, "")); 27 | setIPList(noPortList); 28 | } 29 | 30 | // 去除协议 31 | function removeProtocols() { 32 | const ipList = getIPList(); 33 | const noProtocolList = ipList.map(ip => ip.replace(/^https?:\/\//, "")); 34 | setIPList(noProtocolList); 35 | } 36 | 37 | // 批量加上 CIDR 后缀 38 | function addCIDR(suffix) { 39 | const ipList = getIPList(); 40 | const cidrList = ipList.map(ip => ip + suffix); 41 | setIPList(cidrList); 42 | } 43 | 44 | // 提取域名 45 | function extractDomains() { 46 | const ipList = getIPList(); 47 | const domainList = ipList.map(ip => { 48 | if (ip.match(/^\d+\.\d+\.\d+\.\d+$/)) { 49 | return ""; 50 | } else { 51 | const matches = ip.match(/^(?:https?:\/\/)?((?:[\w-]+\.)+\w+)/); 52 | return matches ? matches[1] : ""; 53 | } 54 | }); 55 | setIPList(domainList); 56 | } 57 | 58 | // 提取 IP 59 | function extractIPs() { 60 | const ipList = getIPList(); 61 | const ipOnlyList = ipList.map(ip => { 62 | const matches = ip.match(/^((?:\d+\.){3}\d+)(?::\d+)?$/); 63 | return matches ? matches[1] : ""; 64 | }); 65 | setIPList(ipOnlyList); 66 | } 67 | 68 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | #container { 2 | max-width: 600px; 3 | margin: 0 auto; 4 | } 5 | 6 | #ip-list { 7 | width: 100%; 8 | height: 300px; 9 | padding: 10px; 10 | font-family: monospace; 11 | font-size: 14px; 12 | border: 1px solid #ccc; 13 | margin-bottom: 10px; 14 | } 15 | 16 | button { 17 | display: block; 18 | width: 100%; 19 | padding: 10px; 20 | margin-bottom: 10px; 21 | font-size: 16px; 22 | text-align: center; 23 | border: none; 24 | background-color: #444; 25 | color: #fff; 26 | cursor: pointer; 27 | } 28 | 29 | button:hover { 30 | background-color: #555; 31 | } 32 | 33 | button:focus { 34 | outline: none; 35 | } 36 | 37 | 38 | body { 39 | background-color: #1a1a1a; 40 | color: #d9d9d9; 41 | font-family: monospace; 42 | padding: 20px; 43 | } 44 | 45 | 46 | 47 | h2 { 48 | text-align: center; 49 | } 50 | 51 | h5 { 52 | text-align: center; 53 | } 54 | 55 | body { 56 | background-color: #222; 57 | color: #fff; 58 | font-family: monospace; 59 | font-size: 16px; 60 | margin: 0; 61 | padding: 0; 62 | } 63 | 64 | #container { 65 | max-width: 800px; 66 | margin: 0 auto; 67 | padding: 20px; 68 | } 69 | 70 | h1 { 71 | font-size: 36px; 72 | text-align: center; 73 | margin-bottom: 20px; 74 | } 75 | 76 | textarea { 77 | width: 100%; 78 | height: 300px; 79 | padding: 10px; 80 | border: 1px solid #555; 81 | background-color: #333; 82 | color: #fff; 83 | font-family: monospace; 84 | font-size: 16px; 85 | resize: none; 86 | } 87 | 88 | button { 89 | display: inline-block; 90 | margin: 10px; 91 | padding: 10px 20px; 92 | border: 1px solid #fff; 93 | background-color: #444; 94 | color: #fff; 95 | font-family: monospace; 96 | font-size: 16px; 97 | text-align: center; 98 | cursor: pointer; 99 | transition: all 0.3s; 100 | } 101 | 102 | button:hover { 103 | background-color: #555; 104 | } 105 | 106 | button:active { 107 | transform: translateY(1px); 108 | } 109 | 110 | button:first-child { 111 | margin-left: 0; 112 | } 113 | 114 | button:last-child { 115 | margin-right: 0; 116 | } 117 | --------------------------------------------------------------------------------