Icons and Script updates

This commit is contained in:
Sascha Leib
2025-09-03 23:20:56 +02:00
parent 6022fa1248
commit 43d9de6b9b
16 changed files with 185 additions and 158 deletions

View File

@@ -1,11 +1,12 @@
<h1>BotMon Cleanup Script</h1>
<ul><?php
// get all files in the logs directory
$dir = scandir('logs');
// exclude the following two dates:
$today = gmdate('Y-m-d');
$yesterday = gmdate('Y-m-d', time() - 86400);
// scan the log directory and delete all files except for today and yesterday:
$dir = scandir('logs');
foreach($dir as $file) {
$fName = pathinfo($file, PATHINFO_BASENAME);
$bName = strtok($fName, '.');

View File

@@ -1,11 +1,17 @@
[
{"id": "google",
{"id": "bingbot",
"n": "Bingbot",
"r": ["bingbot"],
"rx": ["\\sbingbot\\/(\\d+\\.\\d+);"],
"url": "http://www.bing.com/bingbot.htm"
},
{"id": "googlebot",
"n": "GoogleBot",
"r": ["Googlebot"],
"rx": ["Googlebot\\/(\\d+\\.\\d+);"],
"rx": ["\\sGooglebot\\/(\\d+\\.\\d+);"],
"url": "http://www.google.com/bot.html"
},
{"id": "googlead",
{"id": "googleads",
"n": "Google AdsBot",
"r": ["AdsBot-Google", "AdsBot-Google-Mobile", "Mediapartners-Google"],
"rx": ["AdsBot-Google;","AdsBot-Google-Mobile;", "Mediapartners-Google\\/(\\d+\\.\\d+);"],
@@ -17,32 +23,32 @@
"rx": ["APIs-Google"],
"url": "https://developers.google.com/search/docs/crawling-indexing/google-special-case-crawlers"
},
{"id": "bing",
"n": "Bingbot",
"r": ["bingbot"],
"rx": ["bingbot\\/(\\d+\\.\\d+);"],
"url": "http://www.bing.com/bingbot.htm"
},
{"id": "apple",
{"id": "applebot",
"n": "Applebot",
"r": ["Applebot"],
"rx": ["Applebot\\/(\\d+\\.\\d+);"],
"url": "http://www.apple.com/go/applebot"
},
{"id": "openai",
{"id": "openaibots",
"n": "OpenAI/ChatGPT Bots",
"r": ["OAI-SearchBot", "ChatGPT-User", "GPTBot"],
"rx": ["OAI-SearchBot\\/(\\d+\\.\\d+);", "ChatGPT-User\\/(\\d+\\.\\d+);", "GPTBot\\/(\\d+\\.\\d+);"],
"url": "https://platform.openai.com/docs/bots/"
},
{"id": "yandex",
"n": "Yandex Bots",
{"id": "metabots",
"n": "Meta Web Crawlers",
"r": ["facebookexternalhit", "facebookcatalog","meta-webindexer","meta-externalads","meta-externalagent","meta-externalfetcher"],
"rx": ["facebook\\w+\\/(\\d+\\.\\d+)", "meta-\\w+\\/(\\d+\\.\\d+)"],
"url": "https://developers.facebook.com/docs/sharing/webmasters/crawler"
},
{"id": "yandexbots",
"n": "Yandex (Russia)",
"r": ["YandexBot", "YandexAdNet", "YandexBlogs", "YandexImages", "YandexImageResizer", "YandexMarket", "YandexMedia", "YandexOntoDB", "YandexSitelinks","YandexSpravBot", "YandexVertis", "YandexVerticals", "YandexVideo", "YandexWebmaster", "YandexComBot"],
"rx": ["Yandex\\w+\\/(\\d+\\.\\d+);"],
"url": "http://yandex.com/bots"
},
{"id": "seznam",
"n": "SeznamBot Crawler",
{"id": "seznambot",
"n": "SeznamBot (Czech)",
"r": ["SeznamBot"],
"rx": ["SeznamBot\\/(\\d+\\.\\d+);"],
"url": "https://o-seznam.cz/napoveda/vyhledavani/en/seznambot-crawler/"

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>cogs</title><path d="M15.9,18.45C17.25,18.45 18.35,17.35 18.35,16C18.35,14.65 17.25,13.55 15.9,13.55C14.54,13.55 13.45,14.65 13.45,16C13.45,17.35 14.54,18.45 15.9,18.45M21.1,16.68L22.58,17.84C22.71,17.95 22.75,18.13 22.66,18.29L21.26,20.71C21.17,20.86 21,20.92 20.83,20.86L19.09,20.16C18.73,20.44 18.33,20.67 17.91,20.85L17.64,22.7C17.62,22.87 17.47,23 17.3,23H14.5C14.32,23 14.18,22.87 14.15,22.7L13.89,20.85C13.46,20.67 13.07,20.44 12.71,20.16L10.96,20.86C10.81,20.92 10.62,20.86 10.54,20.71L9.14,18.29C9.05,18.13 9.09,17.95 9.22,17.84L10.7,16.68L10.65,16L10.7,15.31L9.22,14.16C9.09,14.05 9.05,13.86 9.14,13.71L10.54,11.29C10.62,11.13 10.81,11.07 10.96,11.13L12.71,11.84C13.07,11.56 13.46,11.32 13.89,11.15L14.15,9.29C14.18,9.13 14.32,9 14.5,9H17.3C17.47,9 17.62,9.13 17.64,9.29L17.91,11.15C18.33,11.32 18.73,11.56 19.09,11.84L20.83,11.13C21,11.07 21.17,11.13 21.26,11.29L22.66,13.71C22.75,13.86 22.71,14.05 22.58,14.16L21.1,15.31L21.15,16L21.1,16.68M6.69,8.07C7.56,8.07 8.26,7.37 8.26,6.5C8.26,5.63 7.56,4.92 6.69,4.92A1.58,1.58 0 0,0 5.11,6.5C5.11,7.37 5.82,8.07 6.69,8.07M10.03,6.94L11,7.68C11.07,7.75 11.09,7.87 11.03,7.97L10.13,9.53C10.08,9.63 9.96,9.67 9.86,9.63L8.74,9.18L8,9.62L7.81,10.81C7.79,10.92 7.7,11 7.59,11H5.79C5.67,11 5.58,10.92 5.56,10.81L5.4,9.62L4.64,9.18L3.5,9.63C3.41,9.67 3.3,9.63 3.24,9.53L2.34,7.97C2.28,7.87 2.31,7.75 2.39,7.68L3.34,6.94L3.31,6.5L3.34,6.06L2.39,5.32C2.31,5.25 2.28,5.13 2.34,5.03L3.24,3.47C3.3,3.37 3.41,3.33 3.5,3.37L4.63,3.82L5.4,3.38L5.56,2.19C5.58,2.08 5.67,2 5.79,2H7.59C7.7,2 7.79,2.08 7.81,2.19L8,3.38L8.74,3.82L9.86,3.37C9.96,3.33 10.08,3.37 10.13,3.47L11.03,5.03C11.09,5.13 11.07,5.25 11,5.32L10.03,6.06L10.06,6.5L10.03,6.94Z" style="fill:#8D6E63"/></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>incognito</title><path d="M17.06 13C15.2 13 13.64 14.33 13.24 16.1C12.29 15.69 11.42 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C19.23 21 21 19.21 21 17C21 14.79 19.23 13 17.06 13M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17S5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17S8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17S15.5 14.14 17.06 14.14C18.62 14.14 19.88 15.42 19.88 17S18.61 19.86 17.06 19.86M22 10.5H2V12H22V10.5M15.53 2.63C15.31 2.14 14.75 1.88 14.22 2.05L12 2.79L9.77 2.05L9.72 2.04C9.19 1.89 8.63 2.17 8.43 2.68L6 9H18L15.56 2.68L15.53 2.63Z" style="fill:#BF360C"/></svg>

Before

Width:  |  Height:  |  Size: 804 B

1
img/meta.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 191 191" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><circle cx="95.5" cy="95.5" r="95.5" style="fill:#ebebeb;"/><path id="Logo0" d="M27.804,104.326c-0,6.595 1.447,11.657 3.339,14.72c2.48,4.012 6.18,5.712 9.951,5.712c4.865,-0 9.315,-1.207 17.891,-13.069c6.871,-9.507 14.967,-22.851 20.414,-31.217l9.224,-14.174c6.409,-9.843 13.826,-20.785 22.33,-28.202c6.942,-6.054 14.431,-9.417 21.968,-9.417c12.654,-0 24.708,7.333 33.933,21.086c10.095,15.062 14.996,34.034 14.996,53.613c-0,11.639 -2.294,20.191 -6.198,26.947c-3.772,6.534 -11.123,13.062 -23.488,13.062l-0,-18.629c10.588,-0 13.23,-9.729 13.23,-20.864c0,-15.867 -3.699,-33.476 -11.849,-46.058c-5.783,-8.924 -13.279,-14.377 -21.524,-14.377c-8.919,-0 -16.096,6.726 -24.161,18.719c-4.288,6.372 -8.691,14.138 -13.633,22.9l-5.441,9.639c-10.931,19.381 -13.699,23.795 -19.165,31.08c-9.579,12.756 -17.758,17.59 -28.527,17.59c-12.774,0 -20.851,-5.531 -25.854,-13.867c-4.084,-6.792 -6.09,-15.705 -6.09,-25.86l18.654,0.666Z" style="fill:#0081fb;fill-rule:nonzero;"/><path id="Logo1" d="M23.858,51.08c8.552,-13.183 20.894,-22.401 35.049,-22.401c8.198,-0 16.348,2.426 24.858,9.375c9.309,7.597 19.23,20.107 31.608,40.724l4.438,7.399c10.714,17.849 16.81,27.032 20.377,31.362c4.589,5.561 7.802,7.219 11.976,7.219c10.588,-0 13.23,-9.729 13.23,-20.864l16.456,-0.516c-0,11.639 -2.294,20.191 -6.198,26.947c-3.772,6.534 -11.123,13.062 -23.488,13.062c-7.688,0 -14.498,-1.669 -22.029,-8.774c-5.79,-5.453 -12.558,-15.14 -17.765,-23.848l-15.489,-25.873c-7.771,-12.984 -14.9,-22.666 -19.026,-27.05c-4.438,-4.714 -10.143,-10.408 -19.248,-10.408c-7.369,0 -13.627,5.171 -18.864,13.081l-15.885,-9.435Z" style="fill:url(#_Linear1);fill-rule:nonzero;"/><path id="Logo2" d="M58.607,47.434c-7.369,0 -13.627,5.171 -18.864,13.081c-7.405,11.176 -11.939,27.824 -11.939,43.811c-0,6.595 1.447,11.657 3.339,14.72l-15.903,10.474c-4.084,-6.792 -6.09,-15.705 -6.09,-25.86c0,-18.468 5.069,-37.716 14.708,-52.58c8.552,-13.183 20.894,-22.401 35.049,-22.401l-0.3,18.755Z" style="fill:url(#_Linear2);fill-rule:nonzero;"/><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(118.913,6.0057,-6.0057,118.913,45.7848,98.9453)"><stop offset="0" style="stop-color:#0064e1;stop-opacity:1"/><stop offset="0.4" style="stop-color:#0064e1;stop-opacity:1"/><stop offset="0.83" style="stop-color:#0073ee;stop-opacity:1"/><stop offset="1" style="stop-color:#0082fb;stop-opacity:1"/></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.68452e-15,-43.8416,43.8416,2.68452e-15,36.1757,112.158)"><stop offset="0" style="stop-color:#0082fb;stop-opacity:1"/><stop offset="1" style="stop-color:#0064e0;stop-opacity:1"/></linearGradient></defs></svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

1
img/openai.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><ellipse cx="12" cy="12" rx="12" ry="12" style="fill:#fffafa;"/><path d="M21.549,10.005c0.506,-1.498 0.332,-3.14 -0.477,-4.502c-1.216,-2.09 -3.662,-3.165 -6.051,-2.659c-1.062,-1.182 -2.589,-1.853 -4.189,-1.844c-2.442,-0.005 -4.608,1.546 -5.359,3.838c-1.568,0.317 -2.922,1.286 -3.714,2.659c-1.226,2.084 -0.946,4.712 0.691,6.499c-0.506,1.499 -0.332,3.14 0.477,4.502c1.217,2.09 3.662,3.165 6.051,2.659c1.061,1.182 2.589,1.854 4.189,1.843c2.443,0.006 4.61,-1.546 5.361,-3.84c1.569,-0.317 2.922,-1.286 3.715,-2.659c1.224,-2.084 0.944,-4.71 -0.693,-6.498l-0.001,0.002Zm-8.38,11.557c-0.978,0.002 -1.925,-0.336 -2.675,-0.954c0.034,-0.017 0.093,-0.05 0.132,-0.073l4.439,-2.53c0.228,-0.128 0.367,-0.366 0.365,-0.624l0,-6.176l1.876,1.07c0.021,0.009 0.034,0.028 0.037,0.05l0,5.114c-0.003,2.275 -1.87,4.119 -4.174,4.123Zm-8.977,-3.783c-0.49,-0.835 -0.667,-1.813 -0.498,-2.763c0.032,0.02 0.09,0.055 0.131,0.078l4.439,2.53c0.226,0.131 0.505,0.131 0.73,0l5.42,-3.088l0,2.139c0.002,0.022 -0.009,0.043 -0.026,0.057l-4.488,2.556c-1.999,1.136 -4.552,0.461 -5.708,-1.509l-0,0Zm-1.169,-9.563c0.487,-0.836 1.257,-1.475 2.175,-1.807c0,0.038 -0.003,0.104 -0.003,0.151l0,5.061c-0.001,0.258 0.139,0.496 0.365,0.623l5.42,3.088l-1.876,1.069c-0.019,0.012 -0.043,0.014 -0.064,0.005l-4.488,-2.558c-1.995,-1.141 -2.68,-3.659 -1.529,-5.631l-0,-0.001Zm15.416,3.541l-5.42,-3.089l1.877,-1.069c0.019,-0.012 0.043,-0.013 0.063,-0.005l4.489,2.557c1.998,1.139 2.683,3.662 1.529,5.634c-0.489,0.835 -1.258,1.474 -2.175,1.806l0,-5.212c0.002,-0.257 -0.136,-0.495 -0.362,-0.622l-0.001,-0Zm1.868,-2.774c-0.033,-0.02 -0.091,-0.054 -0.132,-0.077l-4.44,-2.53c-0.224,-0.131 -0.503,-0.131 -0.729,-0l-5.42,3.088l0,-2.139c-0.002,-0.022 0.009,-0.043 0.027,-0.057l4.487,-2.554c1.999,-1.138 4.555,-0.461 5.707,1.512c0.487,0.833 0.664,1.809 0.499,2.757l0.001,-0Zm-11.741,3.811l-1.877,-1.069c-0.021,-0.01 -0.033,-0.029 -0.036,-0.051l-0,-5.114c0.001,-2.277 1.874,-4.123 4.181,-4.122c0.976,0 1.921,0.339 2.671,0.955c-0.034,0.018 -0.093,0.05 -0.132,0.073l-4.439,2.53c-0.228,0.128 -0.367,0.366 -0.365,0.623l-0.003,6.173l-0,0.002Zm1.019,-2.169l2.415,-1.376l2.413,1.375l0,2.751l-2.413,1.376l-2.415,-1.376l0,-2.75Z" style="fill-rule:nonzero;"/></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,53 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 20 20"
fill="none"
aria-label="Qwant"
width="24"
height="24"
version="1.1"
id="svg2"
sodipodi:docname="qwant.svg"
inkscape:version="1.4 (86a8ad7, 2024-10-11)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<sodipodi:namedview
id="namedview2"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="27.291667"
inkscape:cx="20.99542"
inkscape:cy="21.068702"
inkscape:window-width="2880"
inkscape:window-height="1526"
inkscape:window-x="2869"
inkscape:window-y="-11"
inkscape:window-maximized="1"
inkscape:current-layer="svg2" />
<g
id="g2"
transform="matrix(0.50665099,0,0,0.50665099,1.2883896,-3.0136865e-8)">
<path
d="m 28.27,0 -1.155,4.482 -4.433,1.143 v 0.457 l 4.433,1.144 1.156,4.481 h 0.432 l 1.156,-4.481 4.53,-1.169 V 5.65 L 29.859,4.482 28.703,0 h -0.432 z"
fill="var(--color-icon-primary, #000)"
id="path1"
style="fill:#000000" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M 25.548,21.02 C 25.548,12.75 19.828,8.492 12.774,8.492 5.719,8.492 0,12.748 0,21.02 c 0,7.68 4.85,11.839 11.126,12.449 3.247,5.312 7.9,6.984 13.028,5.475 l 0.373,-0.47 1.012,-5.054 -0.902,-0.49 c -2.889,2.453 -7.532,2.451 -10.608,0.572 6.466,-0.474 11.519,-4.656 11.519,-12.482 z m -6.063,0 c 0,5.69 -2.178,10.302 -6.71,10.302 -4.767,0 -6.71,-4.613 -6.71,-10.303 0,-5.69 2.022,-10.302 6.71,-10.302 4.823,0 6.71,4.612 6.71,10.302 z"
fill="var(--color-icon-primary, #000)"
id="path2"
style="fill:#000000" />
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><circle cx="12" cy="12" r="12" style="fill:#fff;"/><path id="path1" d="M18.785,0.945l-0.663,2.571l-2.543,0.656l-0,0.262l2.543,0.656l0.663,2.571l0.248,-0l0.663,-2.571l2.599,-0.67l-0,-0.234l-2.599,-0.67l-0.663,-2.571l-0.248,0Z" style="fill-rule:nonzero;"/><path id="path2" d="M17.223,13.003c0,-4.744 -3.281,-7.186 -7.328,-7.186c-4.047,-0 -7.328,2.441 -7.328,7.186c0,4.406 2.783,6.792 6.383,7.142c1.862,3.047 4.532,4.006 7.473,3.14l0.214,-0.269l0.581,-2.899l-0.518,-0.282c-1.657,1.408 -4.32,1.406 -6.085,0.329c3.709,-0.272 6.608,-2.671 6.608,-7.161Zm-3.478,0c-0,3.264 -1.249,5.91 -3.849,5.91c-2.735,0 -3.849,-2.646 -3.849,-5.91c-0,-3.264 1.159,-5.91 3.849,-5.91c2.766,-0 3.849,2.646 3.849,5.91l-0,0Z"/></svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 16 KiB

1
img/scriptrun.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>script-text-play</title><path d="M13.8 22H5C3.3 22 2 20.7 2 19V18H13.1C13 18.3 13 18.7 13 19C13 20.1 13.3 21.1 13.8 22M13.8 16H5V5C5 3.3 6.3 2 8 2H19C20.7 2 22 3.3 22 5V6H20V5C20 4.4 19.6 4 19 4S18 4.4 18 5V13.1C16.2 13.4 14.7 14.5 13.8 16M8 8H15V6H8V8M8 12H14V10H8V12M17 16V22L22 19L17 16Z" style="fill:#BF360C"/></svg>

After

Width:  |  Height:  |  Size: 387 B

1
img/seznam.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><circle cx="16" cy="16" r="16" style="fill:#ebebeb;"/><path d="M16.276,4.766c-0.759,0.126 -1.512,0.271 -2.267,0.44c-0.498,0.111 -0.993,0.213 -1.485,0.341c-0.452,0.122 -0.915,0.223 -1.36,0.374c-0.43,0.137 -0.851,0.284 -1.27,0.452c-0.826,0.332 -1.59,0.798 -2.263,1.381c-0.42,0.355 -0.796,0.758 -1.121,1.202c-0.223,0.319 -0.424,0.653 -0.599,1.001c-0.181,0.344 -0.28,0.726 -0.29,1.115c-0.004,1.128 0.68,2.071 1.473,2.773c0.264,0.225 0.538,0.438 0.819,0.639c0.846,0.598 1.738,1.128 2.668,1.585c0.948,0.469 1.912,0.921 2.879,1.351c0.919,0.407 1.852,0.75 2.8,1.078c0.274,0.089 0.549,0.181 0.82,0.277c0.862,0.299 1.734,0.569 2.583,0.886c0.534,0.202 1.094,0.386 1.627,0.636c0.565,0.239 1.104,0.538 1.606,0.891c0.329,0.243 0.606,0.551 0.812,0.905c0.208,0.354 0.325,0.754 0.34,1.164c0.012,0.391 -0.091,0.777 -0.298,1.109c-0.534,0.866 -1.462,1.453 -2.355,1.849c-1.331,0.584 -2.696,1.089 -4.086,1.512c-0.798,0.243 -1.589,0.481 -2.39,0.695c-0.801,0.224 -1.619,0.445 -2.426,0.657c-0.808,0.21 -1.616,0.402 -2.427,0.585c-0.461,0.106 -0.931,0.206 -1.392,0.303c-0.277,0.063 -0.549,0.12 -0.827,0.184c-0.581,0.127 -1.159,0.259 -1.746,0.388c-0.66,0.15 -1.322,0.3 -1.988,0.449c-0.188,0.043 -0.386,0.097 -0.574,0.144c-0.172,0.039 -0.814,0.191 -0.336,0.163c0.662,-0.037 2.431,-0.196 6.209,-0.721c1.374,-0.236 2.749,-0.439 4.117,-0.67c1.713,-0.29 3.409,-0.631 5.097,-1.048c0.481,-0.117 0.957,-0.243 1.441,-0.379c0.316,-0.093 0.628,-0.188 0.935,-0.289c1.328,-0.424 3.456,-1.174 3.956,-1.404c1.926,-0.875 3.122,-1.534 3.744,-3.097c0.221,-0.565 0.307,-1.174 0.253,-1.778c-0.066,-0.553 -0.242,-1.088 -0.519,-1.572c-0.275,-0.446 -0.613,-0.85 -1.005,-1.198c-0.697,-0.652 -1.478,-1.208 -2.322,-1.653c-0.237,-0.131 -0.478,-0.252 -0.723,-0.367c-0.307,-0.147 -0.614,-0.282 -0.918,-0.419c-0.435,-0.186 -0.874,-0.35 -1.319,-0.507c-1.155,-0.408 -2.322,-0.772 -3.487,-1.167c-0.655,-0.225 -1.303,-0.465 -1.935,-0.743c-0.272,-0.113 -0.538,-0.24 -0.796,-0.372c-0.308,-0.155 -0.609,-0.324 -0.904,-0.505c-0.363,-0.228 -0.957,-0.622 -0.793,-1.156c0.117,-0.378 0.515,-0.525 0.842,-0.662c0.305,-0.121 0.616,-0.222 0.934,-0.303c0.959,-0.252 1.939,-0.428 2.901,-0.64c0.284,-0.066 0.573,-0.128 0.857,-0.195c0.764,-0.148 1.516,-0.354 2.249,-0.617c0.619,-0.25 1.412,-0.658 1.639,-1.36c0.332,-1.022 -0.039,-2.129 -0.582,-2.994c-0.197,-0.309 -0.398,-0.614 -0.605,-0.919c-0.281,-0.412 -0.597,-0.8 -0.906,-1.194c-0.051,-0.067 -0.123,-0.115 -0.204,-0.136c-0.081,-0.021 -0.167,-0.013 -0.244,0.021c-0.189,0.069 -0.705,0.693 -4.839,1.515Z" style="fill:#c00;"/></svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 7.1 KiB

1
img/yandex.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path d="M0,12c0,-6.628 5.371,-12 12,-12c6.626,0 12,5.372 12,12c0,6.628 -5.374,12 -12,12c-6.629,0 -12,-5.372 -12,-12Z" style="fill:#fc3f1d;fill-rule:nonzero;"/><path d="M13.536,6.799l-1.109,0c-2.033,0 -3.102,1.03 -3.102,2.548c0,1.716 0.739,2.52 2.257,3.551l1.254,0.844l-3.603,5.385l-2.693,-0l3.234,-4.817c-1.86,-1.333 -2.904,-2.628 -2.904,-4.818c0,-2.746 1.914,-4.62 5.544,-4.62l3.604,0l-0,14.242l-2.482,-0l0,-12.315Z" style="fill:#fff;fill-rule:nonzero;"/></svg>

After

Width:  |  Height:  |  Size: 903 B

162
script.js
View File

@@ -1,3 +1,4 @@
"use strict";
/* DokuWiki BotMon Plugin Script file */
/* 03.09.2025 - 0.1.7 - pre-release */
/* Authors: Sascha Leib <ad@hominem.info> */
@@ -209,30 +210,41 @@ BotMon.live = {
},
// register a new visitor (or update if already exists)
registerVisit: function(dat) {
registerVisit: function(dat, type) {
//console.info('registerVisit', dat);
// shortcut to make code more readable:
const model = BotMon.live.data.model;
// check if it already exists:
let visitor = model.findVisitor(dat.id);
if (!visitor) {
// is it a known bot?
const bot = BotMon.live.data.bots.match(dat.agent);
// override the visitor type?
let visitorType = dat.typ;
if (bot) visitorType = 'bot';
// which user id to use:
let visitorId = dat.id; // default is the session ID
if (bot) visitorId = bot.id; // use bot ID if known bot
if (dat.usr !== '') visitorId = 'usr'; // use user ID if known user
model._visitors.push(dat);
visitor = dat;
visitor.id = visitorId;
visitor._firstSeen = dat.ts;
visitor._lastSeen = dat.ts;
visitor._isBot = ( bot ? 1.0 : 0.0 ); // likelihood of being a bot; primed to 0% or 100% in case of a known bot
visitor._seenBy = [type];
visitor._pageViews = []; // array of page views
visitor._hasReferrer = false; // has at least one referrer
visitor._jsClient = false; // visitor has been seen logged by client js as well
visitor._client = bot ?? BotMon.live.data.clients.match(dat.agent) ?? null; // client info (browser, bot, etc.)
visitor._client = BotMon.live.data.clients.match(dat.agent) ?? null; // client info
visitor._bot = bot ?? null; // bot info
visitor._platform = BotMon.live.data.platforms.match(dat.agent); // platform info
// known bots get the bot ID as identifier:
if (bot) visitor.id = bot.id;
visitor._type = visitorType;
}
// find browser
@@ -271,20 +283,25 @@ BotMon.live = {
// shortcut to make code more readable:
const model = BotMon.live.data.model;
let visitor = model.findVisitor(dat.id);
const type = 'log';
let visitor = BotMon.live.data.model.findVisitor(dat.id);
if (!visitor) {
visitor = model.registerVisit(dat);
visitor = model.registerVisit(dat, type);
visitor._seenBy = [type];
}
if (visitor) {
// prime the "seen by" list:
seenBy = ( visitor._seenBy ? ( visitor._seenBy.includes(type) ? visitor._seenBy : [...visitor._seenBy, type] ) : [type] );
visitor._lastSeen = dat.ts;
visitor._seenBy = seenBy;
visitor._jsClient = true; // seen by client js
} else {
console.warn(`No visit with ID ${dat.id}.`);
return;
}
// find the page view:
let prereg = model._getVisit(visitor, dat);
let prereg = BotMon.live.data.model._getVisit(visitor, dat);
if (prereg) {
// update the page view:
prereg._lastSeen = dat.ts;
@@ -315,11 +332,12 @@ BotMon.live = {
let visitor = model.findVisitor(dat.id);
if (!visitor) {
console.warn(`No visitor with ID ${dat.id}, registering a new one.`);
visitor = model.registerVisit(dat);
visitor = model.registerVisit(dat, 'tck');
}
if (visitor) {
// update "last seen":
// update visitor:
if (visitor._lastSeen < dat.ts) visitor._lastSeen = dat.ts;
if (!visitor._seenBy.includes('tck')) visitor._seenBy.push('tck');
// get the page view info:
const pv = model._getVisit(visitor, dat);
@@ -382,6 +400,7 @@ BotMon.live = {
// shortcut to make code more readable:
const model = BotMon.live.data.model;
console.log(model._visitors);
// loop over all visitors:
model._visitors.forEach( (v) => {
@@ -391,17 +410,17 @@ BotMon.live = {
this.data.totalPageViews += v._pageViews.length;
// check for typical bot aspects:
let botScore = v._isBot; // start with the known bot score
let botScore = 0;
if (v._isBot >= 1.0) { // known bots
/*if (v._isBot >= 1.0) { // known bots
this.data.bots.known += 1;
this.groups.knownBots.push(v);
} if (v.usr && v.usr != '') { // known users
} if (v.usr && v.usr != '') { // known users */
this.groups.users.push(v);
this.data.bots.users += 1;
} else {
/*} else {
// not a known bot, nor a known user; check other aspects:
// no referrer at all:
@@ -431,7 +450,7 @@ BotMon.live = {
this.data.bots.human += 1;
this.groups.humans.push(v);
}
}
}*/
});
console.log(this.data);
@@ -454,10 +473,9 @@ BotMon.live = {
throw new Error(`${response.status} ${response.statusText}`);
}
BotMon.live.data.bots._list = await response.json();
BotMon.live.data.bots._ready = true;
this._list = await response.json();
this._ready = true;
// TODO: allow using the bots list...
} catch (error) {
BotMon.live.gui.status.setError("Error while loading the known bots file: " + error.message);
} finally {
@@ -467,22 +485,40 @@ BotMon.live = {
},
// returns bot info if the clientId matches a known bot, null otherwise:
match: function(client) {
//console.info('BotMon.live.data.bots.match(',client,')');
match: function(agent) {
//console.info('BotMon.live.data.bots.match(',agent,')');
if (client) {
for (let i=0; i<BotMon.live.data.bots._list.length; i++) {
const bot = BotMon.live.data.bots._list[i];
const BotList = BotMon.live.data.bots._list;
// default is: not found!
let botInfo = null;
// check for known bots:
if (agent) {
BotList.find(bot => {
let r = false;
for (let j=0; j<bot.rx.length; j++) {
if (client.match(new RegExp(bot.rx[j]))) {
return bot; // found a match
const rxr = agent.match(new RegExp(bot.rx[j]));
if (rxr) {
botInfo = {
n : bot.n,
id: bot.id,
url: bot.url,
v: (rxr.length > 1 ? rxr[1] : -1)
}
r = true;
break;
}
}
return null; // not found!
}
return r;
});
}
//console.log("botInfo:", botInfo);
return botInfo;
},
// indicates if the list is loaded and ready to use:
_ready: false,
@@ -516,16 +552,16 @@ BotMon.live = {
},
// returns bot info if the user-agent matches a known bot, null otherwise:
match: function(cid) {
//console.info('BotMon.live.data.clients.match(',cid,')');
match: function(agent) {
//console.info('BotMon.live.data.clients.match(',agent,')');
let match = {"n": "Unknown", "v": -1, "id": null};
if (cid) {
if (agent) {
BotMon.live.data.clients._list.find(client => {
let r = false;
for (let j=0; j<client.rx.length; j++) {
const rxr = cid.match(new RegExp(client.rx[j]));
const rxr = agent.match(new RegExp(client.rx[j]));
if (rxr) {
match.n = client.n;
match.v = (rxr.length > 1 ? rxr[1] : -1);
@@ -538,6 +574,7 @@ BotMon.live = {
});
}
//console.log(match)
return match;
},
@@ -609,7 +646,7 @@ BotMon.live = {
},
loadLogFile: async function(type, onLoaded = undefined) {
// console.info('BotMon.live.data.loadLogFile(',type,')');
console.info('BotMon.live.data.loadLogFile(',type,')');
let typeName = '';
let columns = [];
@@ -656,19 +693,21 @@ BotMon.live = {
const data = {};
cols.forEach( (colVal,i) => {
colName = columns[i] || `col${i}`;
const colValue = (colName == 'ts' ? new Date(colVal) : colVal);
const colValue = (colName == 'ts' ? new Date(colVal) : colVal.trim());
data[colName] = colValue;
});
// register the visit in the model:
switch(type) {
case 'srv':
BotMon.live.data.model.registerVisit(data);
BotMon.live.data.model.registerVisit(data, type);
break;
case 'log':
data.typ = 'js';
BotMon.live.data.model.updateVisit(data);
break;
case 'tck':
data.typ = 'js';
BotMon.live.data.model.updateTicks(data);
break;
default:
@@ -856,6 +895,8 @@ BotMon.live = {
// shortcut for neater code:
const make = BotMon.t._makeElement;
let ipType = ( data.ip.indexOf(':') >= 0 ? '6' : '4' );
const li = make('li'); // root list item
const details = make('details');
const summary = make('summary');
@@ -863,15 +904,29 @@ BotMon.live = {
const span1 = make('span'); /* left-hand group */
let typeDescr = "Seen by: " + ( data.typ == 'php' ? "Server-only": "Server + Client");
span1.appendChild(make('span', { /* Type */
'class': 'icon type type_' + data.typ,
'title': typeDescr
}, data.typ));
if (data._type == 'bot') { /* Bot only */
span1.appendChild(make('span', { /* ID */
'class': 'id'
}, data.id));
span1.appendChild(make('span', { /* Bot */
'class': 'bot bot_' + (data._bot ? data._bot.id : 'unknown'),
'title': "Bot: " + (data._bot ? data._bot.n : 'Unknown')
}, (data._bot ? data._bot.n : 'Unknown')));
} else if (data._type == 'usr') { /* User only */
span1.appendChild(make('span', { /* User */
'class': 'user' + (data._user ? data._user.id : 'unknown'),
'title': "User: " + data.usr
}, data.usr));
} else { /* others */
if (data.ip == '127.0.0.1' || data.ip == '::1' ) ipType = '0';
span1.appendChild(make('span', { /* IP-Address */
'class': 'ipaddr ip' + ipType,
'title': "IP-Address: " + data.ip
}, data.ip));
}
const platformName = (data._platform ? data._platform.n : 'Unknown');
span1.appendChild(make('span', { /* Platform */
@@ -885,12 +940,7 @@ BotMon.live = {
'title': "Client: " + clientName
}, clientName));
let ipType = ( data.ip.indexOf(':') >= 0 ? '6' : '4' );
if (data.ip == '127.0.0.1' || data.ip == '::1' ) ipType = '0';
span1.appendChild(make('span', { /* IP-Address */
'class': 'icon ipaddr ip' + ipType,
'title': "IP-Address: " + data.ip
}, data.ip));
summary.appendChild(span1);
const span2 = make('span'); /* right-hand group */
@@ -906,6 +956,12 @@ BotMon.live = {
const dl = make('dl', {'class': 'visitor_details'});
if (data._bot) {
dl.appendChild(make('dt', {}, "Bot:")); /* bot info */
dl.appendChild(make('dd', {'class': 'has_icon bot bot_' + (data._bot ? data._bot.id : 'unknown')},
(data._bot ? data._bot.n : 'Unknown')));
}
dl.appendChild(make('dt', {}, "Client:")); /* client */
dl.appendChild(make('dd', {'class': 'has_icon client_' + (data._client ? data._client.id : 'unknown')},
clientName + ( data._client.v > 0 ? ' (' + data._client.v + ')' : '' ) ));

View File

@@ -95,7 +95,7 @@
}
}
&[open] {
summary::before {
& > summary::before {
transform: rotate(0deg);
}
}
@@ -193,43 +193,52 @@
background-size: 1em;
}
/* type icons */
span.type_dw::before, dd.type_dw::before { background-image: url('img/incognito.svg'); }
span.type_php::before, dd.type_php::before { background-image: url('img/cogs.svg'); }
/* bot icons */
span.bot::before, dd.bot::before { background-image: url('img/robot.svg') }
span.bot_bingbot::before, dd.bot_bingbot::before { background-image: url('img/bing.svg') }
span.bot_googlebot::before, dd.bot_googlebot::before,
span.bot_googleads::before, dd.bot_googleads::before,
span.bot_googleapi::before, dd.bot_googleapi::before { background-image: url('img/google.svg') }
span.bot_applebot::before, dd.bot_applebot::before { background-image: url('img/apple.svg') }
span.bot_metabots::before, dd.bot_metabots::before { background-image: url('img/meta.svg') }
span.bot_yandexbots::before, dd.bot_yandexbots::before { background-image: url('img/yandex.svg') }
span.bot_seznambot::before, dd.bot_seznambot::before { background-image: url('img/seznam.svg') }
/* user info */
span.user::before { background-image: url('img/user.svg') }
/* platform icons */
span.platform_macos::before, dd.platform_macos::before { background-image: url('img/macos.svg'); }
span.platform_win10::before, dd.platform_win10::before { background-image: url('img/win11.svg'); }
span.platform_linux::before, dd.platform_linux::before { background-image: url('img/linux.svg'); }
span.platform_ios::before, dd.platform_ios::before { background-image: url('img/ios.svg'); }
span.platform_android::before, dd.platform_android::before { background-image: url('img/android.svg'); }
span.platform_winold::before, dd.platform_winold::before { background-image: url('img/winold.svg'); }
span.platform_tizen::before, dd.platform_tizen::before { background-image: url('img/tizen.png'); }
span.platform_hmos::before, dd.platform_hmos::before { background-image: url('img/hmos.svg'); }
span.platform_chromium::before, dd.platform_chromium::before { background-image: url('img/chromium.svg'); }
span.platform_macos::before, dd.platform_macos::before { background-image: url('img/apple.svg') }
span.platform_win10::before, dd.platform_win10::before { background-image: url('img/win11.svg') }
span.platform_linux::before, dd.platform_linux::before { background-image: url('img/linux.svg') }
span.platform_ios::before, dd.platform_ios::before { background-image: url('img/ios.svg') }
span.platform_android::before, dd.platform_android::before { background-image: url('img/android.svg') }
span.platform_winold::before, dd.platform_winold::before { background-image: url('img/winold.png') }
span.platform_tizen::before, dd.platform_tizen::before { background-image: url('img/tizen.png') }
span.platform_hmos::before, dd.platform_hmos::before { background-image: url('img/hmos.svg') }
span.platform_chromium::before, dd.platform_chromium::before { background-image: url('img/chromium.svg') }
/* browser icons */
span.client_opera::before, dd.client_opera::before { background-image: url('img/opera.svg'); }
span.client_msie::before, dd.client_msie::before { background-image: url('img/msie.svg'); }
span.client_brave::before, dd.client_brave::before { background-image: url('img/brave.svg'); }
span.client_msedge::before, dd.client_msedge::before { background-image: url('img/msedge.svg'); }
span.client_chrome::before, dd.client_chrome::before { background-image: url('img/chrome.svg'); }
span.client_chromeold::before, dd.client_chromeold::before { background-image: url('img/chromeold.svg'); }
span.client_safari::before, dd.client_safari::before { background-image: url('img/safari.svg'); }
span.client_ddg::before, dd.client_ddg::before { background-image: url('img/ddg.svg'); }
span.client_firefox::before, dd.client_firefox::before { background-image: url('img/firefox.svg'); }
span.client_samsung::before, dd.client_samsung::before { background-image: url('img/samsung.svg'); }
span.client_uc::before, dd.client_uc::before { background-image: url('img/uc.svg'); }
span.client_huawei::before, dd.client_huawei::before { background-image: url('img/huawei.png'); }
span.client_opera::before, dd.client_opera::before { background-image: url('img/opera.svg') }
span.client_msie::before, dd.client_msie::before { background-image: url('img/msie.svg') }
span.client_brave::before, dd.client_brave::before { background-image: url('img/brave.svg') }
span.client_msedge::before, dd.client_msedge::before { background-image: url('img/msedge.svg') }
span.client_chrome::before, dd.client_chrome::before { background-image: url('img/chrome.svg') }
span.client_chromeold::before, dd.client_chromeold::before { background-image: url('img/chromeold.svg') }
span.client_safari::before, dd.client_safari::before { background-image: url('img/safari.png') }
span.client_ddg::before, dd.client_ddg::before { background-image: url('img/ddg.svg') }
span.client_firefox::before, dd.client_firefox::before { background-image: url('img/firefox.png') }
span.client_samsung::before, dd.client_samsung::before { background-image: url('img/samsung.svg') }
span.client_uc::before, dd.client_uc::before { background-image: url('img/uc.svg') }
span.client_huawei::before, dd.client_huawei::before { background-image: url('img/huawei.png') }
/* ip address type */
span.ip6::before, dd.ip6::before { background-image: url('img/ip6.svg'); }
span.ip4::before, dd.ip4::before { background-image: url('img/ip4.svg'); }
span.ip0::before, dd.ip0::before { background-image: url('img/localhost.svg'); }
span.ip6::before, dd.ip6::before { background-image: url('img/ip6.svg') }
span.ip4::before, dd.ip4::before { background-image: url('img/ip4.svg') }
span.ip0::before, dd.ip0::before { background-image: url('img/localhost.svg') }
/* user agent */
span.agent::before { background-image: url('img/info.svg'); }
span.agent::before { background-image: url('img/info.svg') }
}
@@ -305,6 +314,13 @@
}
}
/* visitor lists: */
#botmon__today__visitorlists {
details ul > li {
color: #aeaeae;
}
}
footer {
& {
background-color: #0c0c0d;