Skip to content

Instantly share code, notes, and snippets.

@atherton-git
atherton-git / debian_to_kali.sh
Last active July 8, 2023 19:00
Debian_to_Kali
# Make the script executable by setting the following permissions: "chmod +x debian_to_kali.sh"
sudo curl https://archive.kali.org/archive-key.asc -o /etc/apt/trusted.gpg.d/kali-archive-key.asc
sudo sh -c "echo 'deb http://http.kali.org/kali kali-rolling main non-free contrib' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot
sudo apt-get autoremove --purge
sudo apt-get install kali-linux-headless
sudo apt clean
python -c 'import subprocess; subprocess.run("toolkit_dir=\"/usr/csuser/clouddrive/cloudshell-ir-toolkit/\" && git clone https://github.com/atherton-git/cloudshell-ir-toolkit.git \"$toolkit_dir\" && \"${toolkit_dir}initialise.sh\"", shell=True)'
git clone https://github.com/atherton-git/cloudshell-ir-toolkit.git /usr/csuser/clouddrive/cloudshell-ir-toolkit/ && /usr/csuser/clouddrive/cloudshell-ir-toolkit/initialise.sh
oci network security-list update --security-list-id <security-list-ocid> --ingress-security-rules  file://./security_list.json --force
#!/bin/bash
total_lines=$(cat iprange.txt | wc -l)
lines_no=0
echo "["
while read -r line; do
lines_no=$(( $lines_no + 1 ))
echo " {"
echo " \"source\": \"${line}\","
echo " \"protocol\": \"17\","
echo " \"isStateless\": \"false\","
New-NetFirewallRule -DisplayName "MA_Inbound" -Direction inbound -Profile Any -Action Allow -LocalPort 22, 135, 445, 3389, 5985, 5986 -Protocol TCP; Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory "Private"; Enable-PSRemoting; Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Services\WinRM' -name "DelayedAutoStart" -value 0; Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0; net user /add username password; net localgroup "Remote Desktop Users" username /add; shutdown -r -f -t 0
"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev="USB Video" :dshow-size=1920x1080 :dshow-aspect-ratio="16:9" :dshow-fps=60 :dshow-adev="Digital Audio Interface (2- USB Digital Audio)" :live-caching=0 :dshow-audio-channels=2
#!/bin/bash
set -euo pipefail
SRC="/home/calibre/Calibre Library"
DEST="/home/calibre/Dropbox/Apps/Rakuten Kobo"
LOG=~/sync-script.log
echo "=== $(date): Starting Calibre EPUB sync (flat, no date) ===" >> "$LOG"
# 1) Create staging directory representing desired end state