2026/04/30

偵測web 及 組件的工具  

WhatWeb - Next generation web scanner version 0.5.5.

Developed by Andrew Horton (urbanadventurer) and Brendan Coles (bcoles)

Homepage: https://www.morningstarsecurity.com/research/whatweb


Usage: whatweb [options] <URLs>


  <TARGETs>                     Enter URLs, hostnames, IP addresses, filenames or

                                IP ranges in CIDR, x.x.x-x, or x.x.x.x-x.x.x.x

                                format.

  --input-file=FILE, -i         Read targets from a file.


  --aggression, -a=LEVEL        Set the aggression level. Default: 1.

  1. Stealthy                   Makes one HTTP request per target and also

                                follows redirects.

  3. Aggressive                 If a level 1 plugin is matched, additional

                                requests will be made.


  --list-plugins, -l            List all plugins.

  --info-plugins, -I=[SEARCH]   List all plugins with detailed information.

                                Optionally search with a keyword.


  --verbose, -v                 Verbose output includes plugin descriptions.


Note: This is the short usage help. For the complete usage help use -h or --help.

2026/04/26

手動更新 docker並重啟


#!/bin/bash

rm -f /tmp/docker_run

read -p "docker name:" docker_name

ori=$(docker ps -a --filter "name=^/${docker_name}$" --format "{{.Image}}")

docker pull $ori

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike $docker_name > /tmp/docker_run

chmod +x /tmp/docker_run

docker rm -f $docker_name

/tmp/docker_run

2026/04/22

前几天把grafana升到 13 版後

原本可以捉的圖都無法出現了

查了一下才知道 13 版 已經把  

grafana-image-renderer 的plugin 拿掉了

官方文件有提到怎麼理

https://grafana.com/docs/grafana/latest/setup-grafana/image-rendering/


2026/04/17

昨天看文章有提到 MediaMTX 這個軟体
單一檔案就可以執行
想說下載來玩玩
有几個點要注意

使用obs串流時 輸出 設定一定要修改如下 否則無法串流成功


















另外就是直接用browser 打開 使用 webrtc 時 影像沒問題 但完全沒聲音
但這時用 vlc 去開 影像聲音都沒問題
查到說是音訊編碼的問題
但srs沒有這個問題

使用如下指令推流 影音都沒問題

ffmpeg -re -i input.mp4 \
  -c:v libx264 -preset veryfast -tune zerolatency \
  -c:a libopus -ar 48000 -ac 2 -b:a 96k \
  -f rtsp rtsp://localhost:8554/live


還有一個問題就是browser打開後預設是靜音 要手動打開



使用以下指令進行螢幕擷取並串流 影音都沒問題

ffmpeg -f x11grab -video_size 1024x768 -framerate 30 -i :0.0 \
-f pulse -i default \
-c:v libx264 -preset veryfast -pix_fmt yuv420p -g 60 -bf 0 \
-c:a libopus -b:a 128k -ar 48000 -ac 2 \
-flags +global_header \
-rtsp_transport tcp -f rtsp rtsp://localhost:8554/live


obs目前還沒找到方法

2026/04/14

之前filegator docker 更新後 之前建的user都會不見
而且admin的密碼也會還原成預設

原來是少加了一個對應

-v filegator-private:/var/www/filegator/private

完整如下

docker run -d -p 9999:8080 -v filegator-data:/var/www/filegator/repository -v filegator-private:/var/www/filegator/private --name filegator --restart=always filegator/filegator:latest

2026/03/21

超級好用的docker更新工具

https://github.com/mag37/dockcheck

2026/03/10

安裝openclaw時 大模型的選單裡沒有 ollama 可以選
只能利用ollama去呼叫

ollama launch openclaw --model gpt-oss:120b-cloud

一些ollama會用到的指令

ollama ls



一些openclaw會用到的指令

openclaw plugins list

openclaw update

openclaw logs --follow

openclaw onboard

openclaw approvals allowlist 


2026/03/09

上週因為ruckus switch 的power壞了
查log時竟然查到內部攻擊者








想說能不能從vsz把user踢掉
程式如下

#!/bin/bash

#how to use

#./vsz_kick_ip ip

VSZ="https://10.1.1.1:8443"
USER="user"
PASS="passwd"

IP="$1"

#拿到cookie.txt

curl -k -c /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/session" \
  -H "Content-Type: application/json" \
  -d "{\"username\": \"$USER\", \"password\": \"$PASS\"}"

#使用cookie.txt 找出 ip 是那個 mac

MAC=$(curl -sk -b /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/query/client" -H "Content-Type: application/json" -d '{"limit": 100000,"index": 0}'|jq|grep $IP -A 2|tail -n 1|cut -d '"' -f 4)

echo $MAC


#取出 mac 並斷線

curl -sk -b /tmp/cookie.txt -X POST "$VSZ/wsg/api/public/v6_1/clients/disconnect" -H "Content-Type: application/json" -d '{"mac":"'$MAC'"}'

運作沒問題
但踢掉後又會馬上連線 所以沒用
本來是想再加入黑名單
但現在的無線又是隨几mac
所以感覺作用不大
再想想要怎麼處理

2026/03/05

今天要把graylog升到 7.0.5
竟然出現以下問題

file /usr/lib/.build-id/0f/5bf41e3e207feb6cab260b2366f1697c13555b conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/2a/45eebcedc9ddddd7e43512f1c1d13a625cfe52 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/32/f8130f4d86dfcf5f9af96b1cb932eda8015165 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/3c/51e24cab713cbc44a4b05fed44660d7d8e4035 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/3d/552045a6af8c09b554b88b43d19a50b9e52b99 conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/7f/0274197caa4afcc5c5430232e140211d611a4f conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/db/dfd874aa078c8f1feacc28175a6a874c060d6a conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64
  file /usr/lib/.build-id/e7/189286cdb1e6c44b0968f6d52855af9696ae2c conflicts between attempted installs of graylog-datanode-7.0.5-1.x86_64 and graylog-server-7.0.5-1.x86_64

都是官方的吔 沒測試就丟出來

只能直接手動下載二個rpm

https://downloads.graylog.org/el/stable/7.0/x86_64

再來

rpm -ivh --force graylog-server-7.0.5-1.x86_64.rpm graylog-datanode-7.0.5-1.x86_64.rpm


2026/03/03

還是 ollama

一開始安裝是使用 官方提供的script 裝在lxc上

curl -fsSL https://ollama.com/install.sh | sh

接下來視需求跑model

ollama run gpt-oss:20b

要看下載了那些 model

使用 ollama ls

跑起來在文字介面上可以下指令

如果需要有網頁界面

最快的方式是在同一台几器跑 open-webui 

docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main

登入後就可以選擇任何已下載的模型來使用 很方便 直接選擇就能用 不需要 先 ollma run

ollama 也有docker可以使用

https://hub.docker.com/r/ollama/ollama

docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama


裝好後使用以下指令進到內部再下指令

docker exec -it ollama /bin/bash

2026/03/02

有台 CISCO UCS C240 M5S 的HD最近壞了

換新之後 smart 捉不到資料了

# smartctl -i /dev/bus/0 -d megaraid,2
smartctl 7.4 2024-10-15 r5620 [x86_64-linux-6.17.13-1-pve] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
Smartctl open device: /dev/bus/0 [megaraid_disk_02] failed: INQUIRY failed

看了一下是firmware比較新





等待原廠回應如何解決

這几天試了一下 ollama

由於沒有GPU 所以跑大模型很吃力

只能選小模型來跑

單純跑ollama時回應速度還接受

但如果使用 openclaw 或 opencode 再呼叫 速度會非常慢


https://ollama.com/

2026/02/25

昨天升版PVE 9 時有台guest開不起來
訊息如下






一開始以為是os不支援新的virtio版本
把nic換成 e1000或rtl8139都還是相同問題
由於因為程式的原因 這台必須跑x32的os
想說是不是這個原因 於是就把cpu 從 defult 換成 kvm32
再開几就正常了
看起來是pve 9預設已經不支援x32的cpu了 要使用必須手動指定

2026/2/21 06:40 有二台switch down

一開始覺得很怪

還在過年期間 應該不會有人上班而且亂接線才對

以往發生這個問題都是loop

看了log又沒有

週一到現場測試

用fluke測試竟然是通的 但接到別台switch還是不通

直接換了一條 crossover的線 就通了

第一次碰到這種問題

switch本身的跳線偵測几制壞了

2026/02/14

PDM在migrate時
就算 source 跟 destination 在同一個 nfs 的目錄
也會copy 一個新檔案再把舊的砍了
有點多餘
還是直接移轉conf 比較快
使用sshfs同時掛進來 mv 醬應該最快

移轉LXC比較方便

2026/02/12
























昨天在裝dell server時發現這個有趣的東西
把type a的線接上後 就可以用以下的資訊登入

Username: root
Password: calvin
Alternative USB IP: 169.254.0.1 (for direct connection via USB NIC) 

2026/02/10

最近google一直出現要停用pop3收信的通知

所以找個之後能處理信件的方法 找到了 imapsync 


https://github.com/imapsync/imapsync


因為是用 perl 寫的 可以直接下載來執行或跑docker

如果要直接執行需要補很多perl的元件

所以選擇跑docker

mail server 打開 imaps

設定檔案如下 將所有監聽埠開啟

/etc/dovecot/conf.d/10-master.conf

service imap-login {

  inet_listener imap {

    port = 143

  }

  inet_listener imaps {

    port = 993

    ssl = yes

  }

}


service pop3-login {

  inet_listener pop3 {

    port = 110

  }

  inet_listener pop3s {

    port = 995

    ssl = yes

  }

}


設定 SSL 策略


為了讓 110 與 143 也能正常運作,你的 SSL 設定不能過於強硬。 編輯 /etc/dovecot/conf.d/10-ssl.conf:

ssl = yes 


允許不加密的連線同時支援強制加密連線


重啟 dovecot


再來google 要使用 應用程式專用密碼 而不是登入密碼

所以要開啟二階段驗証並設定 應用程式專用密碼


















以上都設定完成後 同步指令如下

測試先 dry run

docker run gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2 --dry


實際執行

docker run gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2


只同步收件夾

docker run gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2  --folder INBOX


同步後刪除來源端信件

docker run gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2 --delete1 --expunge1


執行後刪除container

docker run --rm gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2 --delete1 --expunge1

2026/02/07

docker run 裡的 -v 一定要加 如果不加 升級重裝後資料就會消失

如果不指定 預設存放資料路徑就會是

/var/lib/docker/volumes

如果說明裡要加 -v 但沒加

也會在上述路徑產生一個隨几目錄

但docker rm 後並不會自動刪除

所以必須檢查那些目錄沒用到 進行手動清理

2026/02/05

使用 docker 來跑 duplicati


 docker run -d \

  --name=duplicati \

  -e PUID=1000 \

  -e PGID=1000 \

  -e TZ=Asia/Taipei \

  -e SETTINGS_ENCRYPTION_KEY=YOUR_KEY \

  -e DUPLICATI__WEBSERVICE_PASSWORD=YOUR_PWD \

  -p 8200:8200 \

  -v /tmp/backups:/backups \

  -v /tmp/source:/source \

    lscr.io/linuxserver/duplicati:latest

2026/02/04

每個星期都有forti的消息
早上要登入
竟然出現
看起來很大條