2024/05/27
2024/05/26
2024/05/22
這几天用ZAP在弱掃
當網站很大時 因為會產生很大量的cache
所以要確保執行弱掃那台几器的HD空間要夠
不然有可能還沒做完就爆了
另外有很多網站都出現以下的報告
查了一下 可以在httpd.conf 設定
新增以下內容
<IfModule mod_headers.c>
Header set X-Frame-Options "SAMEORIGIN"
Header set Content-Security-Policy "default-src 'self'"
</IfModule>
設完要重啟apache
另外 如果有參考到外面的任何元件
版面是會亂掉的
這個要特別注意
設完後再掃一次出現另一個報告
如果要再處理
Header set 就要再改成如下的設定
Header set Content-Security-Policy "frame-ancestors 'self'; form-action 'self'; base-uri 'self'; img-src 'self'; default-src 'self'; script-src 'self'; style-src 'self';"
當然影響範圍就會更大
2024/05/16
2024/05/10
2024/05/09
2024/05/08
2024/05/06
2024/04/29
2024/03/28
2024/03/15
2024/03/14
2024/03/13
2024/03/11
2024/03/10
2024/03/05
2024/02/29
2024/02/26
2024/02/24
2024/02/22
2024/02/21
2024/02/16
2024/02/15
2024/02/03
2024/01/29
2023/12/31
2023/12/29
2023/12/23
2023/12/22
2023/12/15
2023/12/10
今天在玩winget
記錄一下在 win11 碰到的問題
內建有安裝但下
winget search notepad 找不到任何東西
要安裝最新版本
https://github.com/microsoft/winget-cli/releases/
目前最新
https://github.com/microsoft/winget-cli/releases/download/v1.6.3133/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
下載後打開
powersell
add-appxpackage ./下載檔名 才能安裝
直接點二下無法安裝
裝好後無法使用 msstore 資料源
一直出現錯誤
搜尋來源時失敗: msstore
執行命令時,發生意外的錯誤:
0x8a15005e : The server certificate did not match any of the expected values.
winget source reset 也沒用
查了才發現 msstore 憑証有問題 有夠無言
下指令bypass msstore 憑証
winget settings --enable BypassCertificatePinningForMicrosoftStore
或加入以下機碼
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\AppInstaller]
"EnableBypassCertificatePinningForMicrosoftStore"=dword:00000001
winget install 一直跳出 UAC 畫面
安裝 gsudo 解決
winget install gerardog.gsudo
重開几
gsudo winget upgrade --all
或
sudo winget upgrade --all
安裝時還是會跳出 gsudo 的UAC 不過只會跳一次 安裝軟体不會再跳
方便好用的工具
尤其是OS裝完後續安裝軟体
還有更新目前安裝的所有軟体
gsudo winget upgrade --all
winget pin add <package> --version
自動接受安裝合約
--accept-package-agreements
2023/12/08
2023/12/02
2023/11/22
2023/11/19
proxmox 8 安裝後修正apt source 並更新
#!/bin/bash
sed -i '1s/^/#/' /etc/apt/sources.list.d/ceph.list
sed -i '1s/^/#/' /etc/apt/sources.list.d/pve-enterprise.list
echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" >> /etc/apt/sources.list
echo "export http_proxy=http://10.1.1.1:3128" > /root/update
echo "apt-get update" >> /root/update
echo "apt-get upgrade -y" >> /root/update
echo "apt-get autoremove -y --purge" >> /root/update
chmod +x /root/update
/root/update
2023/11/01
2023/10/14
最近nas因為更新發生nfs不能使用的問題
因此暫時把graylog搬到其他台還沒更新的nas上
搬完後發現ES變成red
下指令看一下是那些shards
curl -XGET localhost:9200/_cat/shards|grep UNASSIGNED
index.action 0 r UNASSIGNED
index.do 0 r UNASSIGNED
index.aspx 0 r UNASSIGNED
graylog_159 2 p UNASSIGNED
index.htm 0 r UNASSIGNED
index.py 0 r UNASSIGNED
index.php 0 r UNASSIGNED
index.cgi 0 r UNASSIGNED
index.html 0 r UNASSIGNED
index.cfm 0 r UNASSIGNED
index.pl 0 r UNASSIGNED
index.jsp 0 r UNASSIGNED
index.asp 0 r UNASSIGNED
