Merge pull request #3 from saschaleib/devel

Small touchups
This commit is contained in:
Sascha Leib
2025-09-14 19:49:19 +02:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -25,7 +25,7 @@
},
{"n": "Ecosia Browser",
"id": "ecosia",
"rx": [ "\\(Ecosia ios@(\\d+)\\." ]
"rx": [ "\\(Ecosia \\w+@(\\d+)\\." ]
},
{"n": "Silk",
"id": "silk",

View File

@@ -95,7 +95,9 @@ const BotMon = {
/* helper to convert an ip address string to a normalised format: */
_ip2Num: function(ip) {
if (ip.indexOf(':') > 0) { /* IP6 */
if (!ip) {
return 'null';
} else if (ip.indexOf(':') > 0) { /* IP6 */
return (ip.split(':').map(d => ('0000'+d).slice(-4) ).join(''));
} else { /* IP4 */
return Number(ip.split('.').map(d => ('000'+d).slice(-3) ).join(''));