Scratchpad
youtube-dl
DL mp4 movie
youtube-dl youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' "https://www.youtube.com/watch?v=uQ0XteuY-08"
DL mp3 file
youtube-dl -x --audio-quality=0 --audio-format=mp3 "https://www.youtube.com/watch?v=M9Bqu81QrIA"
fish shell
alias ytd="youtube-dl -x --audio-quality=0 --embed-thumbnail --audio-format=mp3 -o '%(title)s.%(ext)s'"
funcsave ytd
ytd <url>a
yt-dlp (new generation ytd)
video
audio
yt-dlp -o '%(title)s.%(ext)s' --audio-quality=0 -x --no-keep-video --audio-format=mp3 https://youtu.be/51cCgxxxxxxFlatpak
sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak search 0ad
flatpak install 0ad
Stunnel
using a custom cert
SERVER
configure PEM
yum install stunnel
cd /etc/pki/tls/certs
make stunnel.pem
generate DH group
dd if=/dev/urandom count=64 | openssl dhparam -rand - 2048
add content between ---BEGIN DH PARAMETERS and ---END DH.. to /etc/pki/tls/certs/stunnel.pem
cat /etc/stunnel/stunnel.conf
debug = 1
foreground = no
chroot = /var/run/stunnel
setuid = nobody
setgid = nobody
pid = /stunnel.pid
socket = l:SO_KEEPALIVE=1
socket = r:SO_KEEPALIVE=1
cert = /etc/pki/tls/certs/stunnel.pem
sslVersion = TLSv1
[ TEST ]
accept = 0.0.0.0:27002
connect = 127.0.0.1:26002
CLIENT
send PEM file to client
[TEST]
client = yes
accept = localhost:27002
connect = <IP of Server>:27002
cert = stunnel.pem
Remote Access & Proxy
ngrok
Nomachine
start NM server
/etc/NX/nxserver --restart
Windows OS
install choco pkg for all users
choco install fluent-terminal -y --force --params "ALLUSERS=1"
Dell sonicwall TZ500 factory reset
connect laptop to SW LAN (X0) interface
configure netwokr on laptop
hold down pin on back of SW to reset, takes about 15sec, yellow light on front will start blinking
restart laptop network,
systemctl restart networking
open up browser go to
reboot with factory settings
Wireshark
add decoder plugin
download plugin
https://github.com/Open-Markets-Initiative/wireshark-lua/tree/master/Cme
add lua script to ~/.local/lib/wireshark/plugins/
QEMU VM
sudo apt install libvirt-daemonsudo systemctl enable libvirtdsudo systemctl start libvirtdsudo apt install qemu-kvmsudo apt install virt-manager
Make sure no other VM softrware is running (Virtualbox, etc)
create new win 10 VM on ubuntu host
1. create pool
2. create volume within the pool
3. install win10 iso (select Browse local files)
4. once win10 is up, install Spice windows guest tools on win10, www.spice-space.org/download.html, this will enable full screen display
5. install openssh server on win guest, Settings > Apps > optional features, install new feature (openssh server) - open up port 22 on win defender
6. restart win guest, check services for sshd service
7. scp any files to guest
scp -r <host dir> <user>@<ip of guest>:/C:/Users/<user>/Downloads
start VM from cmdline
virsh list --allvirsh start win10 -vga virtio
TEAMVIEWER
MacOS
remove TV autostart
sudo launchctl stop com.teamviewer.service
sudo launchctl stop com.teamviewer.teamviewer
sudo launchctl stop com.teamviewer.Helper
sudo launchctl stop com.teamviewer.service
sudo launchctl unload /Library/LaunchAgents/com.teamviewer.teamviewer.plist
sudo launchctl unload /Library/LaunchAgents/com.teamviewer.teamviewer_desktop.plist
sudo launchctl unload /Library/LaunchDaemons/com.teamviewer.*
sudo launchctl remove /Library/LaunchDaemons/com.teamviewer.*
sudo launchctl remove /Library/LaunchAgents/com.teamviewer.*
sudo rm /Library/LaunchAgents/com.teamviewer.*
sudo rm /Library/LaunchDaemons/com.teamviewer.*
stop TV service
Anydesk
anydesk --get-statusanydesk --get-id