workan on ps script for gettin fuckin usb to fuckin work on wsl
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo -e "\n\n\nSTARTING TESSST\n\n\n"
|
||||||
|
disk=""
|
||||||
|
log="log.log"
|
||||||
|
echo > "$log" # initialize to empty
|
||||||
|
|
||||||
|
lsblk
|
||||||
|
read "Enter Disk Name (ex. sda, sdb no /dev or anything else) " disk_choice
|
||||||
|
|
||||||
|
disk="/dev/$disk_choice"
|
||||||
|
|
||||||
|
# echo "runnin inline xz"
|
||||||
|
# sudo dd if=$disk status=progress bs=1M | xz -c > throwaway_image_post0_inline_xz_14052026.img.xz
|
||||||
|
|
||||||
|
echo "runnan raw dd img"
|
||||||
|
sudo dd if=$disk of=throwaway_image_post0_raw_dd_img_14052026.img status=progress bs=1M | tee -a "$log"
|
||||||
|
|
||||||
|
echo "xz compressing raw dd img"
|
||||||
|
xz -v -k throwaway_image_post0_raw_dd_img_14052026.img | tee -a "$log" # yieldds throwaway_image_raw_dd_img_14052026.img.xz
|
||||||
|
|
||||||
|
echo "testing inline xz file"
|
||||||
|
xz -t -v throwaway_image_post0_inline_xz_14052026.img.xz | tee -a "$log"
|
||||||
|
|
||||||
|
echo "testing raw dd xz img.xz"
|
||||||
|
xz -t -v throwaway_image_post0_raw_dd_img_14052026.img.xz | tee -a "$log"
|
||||||
|
|
||||||
|
echo "generating sha256 checksums"
|
||||||
|
echo > checksums.sha256 # clear for initial
|
||||||
|
sha256sum *.img | tee -a checksums.sha256
|
||||||
|
sha256sum *.xz | tee -a checksums.sha256
|
||||||
|
|
||||||
|
echo -e "\n\n\nFUCKING FINAALLY ITS OVER\n\n\n"
|
||||||
@@ -1,27 +1,31 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
timestamp="$(date +%Y-%m-%d-%H%M-%Z)"
|
||||||
echo -e "\n\n\nSTARTING TESSST\n\n\n"
|
echo -e "\n\n\nSTARTING TESSST\n\n\n"
|
||||||
disk=/dev/sda
|
disk=""
|
||||||
log=log.log
|
log="${timestamp}_img_dump_testin.log"
|
||||||
echo > "$log" # initialize to empty
|
echo > "$log" # initialize to empty
|
||||||
|
img_name="${timestamp}_Kali-Pi5-1TB-Working.img"
|
||||||
|
|
||||||
echo "runnin inline xz"
|
lsblk
|
||||||
sudo dd if=$disk status=progress bs=1M | xz -c > throwaway_image_post0_inline_xz_14052026.img.xz
|
read -p "Enter Disk Name (ex. sda, sdb no /dev or anything else) " disk_choice
|
||||||
|
disk="/dev/$disk_choice"
|
||||||
|
|
||||||
echo "runnan raw dd img"
|
# echo "runnin inline xz"
|
||||||
sudo dd if=$disk of=throwaway_image_post0_raw_dd_img_14052026.img status=progress bs=1M | tee -a "$log"
|
# sudo dd if=$disk status=progress bs=1M | xz -c > throwaway_image_post0_inline_xz_14052026.img.xz
|
||||||
|
|
||||||
echo "xz compressing raw dd img"
|
webhook "runnan raw dd img on $disk at 4M bs size (Script Has Run $SECONDS Seconds)"
|
||||||
xz -v -k throwaway_image_post0_raw_dd_img_14052026.img | tee -a "$log" # yieldds throwaway_image_raw_dd_img_14052026.img.xz
|
sudo dd if="$disk" of="$img_name" status=progress bs=4M | tee -a "$log"
|
||||||
|
|
||||||
echo "testing inline xz file"
|
webhook "generating sha256 checksum of $img_name (Script Has Run $SECONDS Seconds)"
|
||||||
xz -t -v throwaway_image_post0_inline_xz_14052026.img.xz | tee -a "$log"
|
sha256sum "$img_name" | tee -a "$img_name.sha256"
|
||||||
|
|
||||||
echo "testing raw dd xz img.xz"
|
webhook "xz compressing raw $img_name.xz (Script Has Run $SECONDS Seconds)"
|
||||||
xz -t -v throwaway_image_post0_raw_dd_img_14052026.img.xz | tee -a "$log"
|
xz -v "$img_name" | tee -a "$log" # yieldds throwaway_image_raw_dd_img_14052026.img.xz
|
||||||
|
|
||||||
echo "generating sha256 checksums"
|
webhook "testing raw dd xz $img_name.xz (Script Has Run $SECONDS Seconds)"
|
||||||
echo > checksums.sha256 # clear for initial
|
xz -t -v "$img_name.xz" | tee -a "$log"
|
||||||
sha256sum *.img | tee -a checksums.sha256
|
|
||||||
sha256sum *.xz | tee -a checksums.sha256
|
|
||||||
|
|
||||||
echo -e "\n\n\nFUCKING FINAALLY ITS OVER\n\n\n"
|
webhook "Generating sha256 checksums of $img_name"
|
||||||
|
sha256sum "$img_name.xz" | tee -a "$img_name.xz.sha256"
|
||||||
|
|
||||||
|
webhook "\n\n\nFUCKING FINAALLY ITS OVER\n\n\n\t$SECONDS Seconds Elapsed\n\tDateTime Started: $timestamp DateTime Finished: $(date +%Y-%m-%d-%H%M-%Z)"
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
port=$(grep '^port=33' /etc/xrdp/xrdp.ini | sed 's/port=//')
|
|
||||||
ip=$(ip addr | grep 'inet 10.\|inet 192.168.' | awk '{print $2}' | sed 's/\/24//')
|
|
||||||
|
|
||||||
sudo /etc/xrdp/startwm.sh
|
|
||||||
sudo systemctl restart xrdp
|
|
||||||
echo "connect on $ip:$port"
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
trap: usage: trap [-Plp] [[action] signal_spec ...]
|
|
||||||
Reference in New Issue
Block a user