2023年2月2日 星期四

OWASP ZAP 2.12.0 install

OWASP ZAP 是網站弱點掃描工具。 
Oracle Java SE看起來在公司使用要收費,所以安裝 OpenJDK。
 
安裝方式:
  • Java

2022年12月18日 星期日

RDP to Ubuntu desktop

Reference:
 
apt install xfce4 xrdp
systemctl enable xrdp
adduser xrdp ssl-cert
vi /etc/xrdp/startwm.sh
新增紅色部分
 
if test -r /etc/profile; then
        . /etc/profile
fi

startxfce4
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
 
重新啟動service
systemctl restart xrdp
 
修改登入帳號user1的 .xsession
su - user1
echo xfce4-session > ~/.xsession
 
PS. GNOME desktop沒測試出來

Ubuntu 22.04.1 install ssh server

Reference:
Ubuntu 安裝與設定 ssh server
 
Ubuntu 22.04.1預設沒有 sshd,安裝指令:
apt install openssh-server -y

確認sshd運行狀況:
systemctl status ssh

如果要讓root可以用ssh連上:
vi /etc/ssh/sshd_config
加上 PermitRootLogin yes
systemctl restart ssh

2022年12月2日 星期五

CentOS Gnome xwindow 縮小後消失的處理方法

Reference:

狀況:
xwindow 縮小後消失

解法:
Right-click on the "task bar", click "Add to Panel", select "Window List" and "Add". 


2022年10月7日 星期五

Run powershell with TaskSchd 工作排程器

Reference:
 
在工作排程器執行 powershell,不能直接指定 ps1 檔案。
 
設定方法:
需要在「程式或指令碼」打powershell
「新增引數」打-file “C:\script\import.ps1” 才能正常運行
 
2024/10/23 update:
如果要把output & error 輸出到檔案,「新增引數」打-file “C:\script\import.ps1 *> log.txt”

Reference: