作者彙整:admin

python mixin

class PrettyMinin(): def dump(self): from pprint import pprint pprint(vars(self)) Mixmin 類別,用於紀錄,印出屬性

發表於 python | 發表迴響

mikrotik 好用list

drop list https://pgl.yoyo.org/adservers/ 國別ip https://mikrotikconfig.com/firewall/

發表於 未分類 | 已標籤 | 發表迴響

spf check

檢查 spf 設定 https://www.kitterman.com/spf/validate.html? https://www.linuxbabe.com/mail-server/setting-up-dkim-and-spf 在 DNS 設定 ~all 全部接收 TXT @ v=spf1 mx ~all 某些 DNS 管理器要求您使用如下引號將 SPF 記錄括起來。 TXT @“v=spf1 mx ~all” 解釋: TXT表示這是一條 TXT 記錄。 在名稱字段中輸入@ 。 v=spf1表示這是一條 SPF 記錄,且 SPF 記錄版本為 SPF1。 mx表示 MX 記錄中列出的所有主機都可以為您的域發送電子郵件,而不允許所有其他主機。 ~all表示來自您域的電子郵件只能來自 … 繼續閱讀 →

發表於 linux, linux-bind, mail | 已標籤 | 發表迴響

windows nginx command

1.start start nginx.exe or nginx.exe 2.stop nginx.exe -s stop or nginx.exe -s quit 3.reload nginx -s reload 4.reopen log nginx -s reopen 5. nginx vversion nginx -v 最後查詢啟動是否成功。 輸入指令:tasklist /fi “imagename eq nginx.exe

發表於 nginx | 發表迴響

CyberPower

1.範例:安裝對應版本1000va https://www.cyberpower.com/tw/zh/product/sku/cp1000avrlcda#downloads 2.dbkg -i cyberpower.deb 3.查看 pwestat -status 4. show pwestat-config 他的shll都在 /etc/sh下 hibernate.sh 休眠 pwrstatd-email.sh 樣板 pwrstatd-lowbatt.sh 低電量執行 shutdown.sh 設定檔 /etc/pwrstatd.conf Power Failure 停電事件 powerfail-delay = 60 0~3600秒 延遲n秒後,執行 script、shutdown powerfail-active = yes yes | no 允許執行 script powerfail-cmd-path … 繼續閱讀 →

發表於 未分類 | 發表迴響

mikrotik knock door

#knock door_官方 /ip firewall filter add action=add-src-to-address-list address-list="port:9000″ \ address-list-timeout=1m chain=input dst-port=9000 protocol=tcp add action=add-src-to-address-list address-list="secure" address-list-timeout=1m \ chain=input dst-port=6000 protocol=tcp src-address-list="port:9000″ add chain=input src-address-list=secure action=accept add action=drop chain=input #knock door / ip firewall filter add chain=input protocol=tcp dst-port=1337 action=add-src-to-address-list … 繼續閱讀 →

發表於 ros | 發表迴響

mikrotik dhcp 偵測警告

if ($leaseActIP = "192.168.100.254″) do={ :log info "IP: $leaseActIP, MAC: $??leaseActMAC, Host: $"lease-hostname"" :tool e-mail send to= MIS@MISMAIL.COM subject="Violation alert!!! 網絡中有新的 DHCP 客戶端" body="MAC: $??leaseActMAC, IP: $leaseActIP, Host: $"lease-hostname", $leaseBound" }

發表於 ros | 發表迴響

mikrotik 黑名單更新 script

#https://ros6.com/?action=tags&item=%E8%84%9A%E6%9C%AC :do [/tool fetch url="https://cache-1.oss-cn-beijing.aliyuncs.com/file/scaners.rsc" dst-path=scaners.rsc check-certificate=yes] :delay 10s :if ([/file find name="scaners.rsc"] != "") do={ /ip firewall address-list remove [find list="scaners"] ###若需要加载到FLASH则注释掉下行代码,若需要加载到RAM则反之。### #:global ipt 30d :delay 2s /imp scaners.rsc :delay 5s /file remove [find name="scaners.rsc"] :log warning "扫描者黑名单更新完成"}

發表於 未分類 | 發表迴響

adguard home 白名單

過濾器–自定規則 @@||網址^$important ex: @@||optimizationguide-pa.googleapis.com^$important

發表於 未分類 | 發表迴響

samba 開啟 smbv1

+上nt這一段 server max protocol = NT1 下面註解# #server min protocol = SMB2_02 #server max protocol = SMB2_24

發表於 linux | 發表迴響