Join Us and become a Member for a Verified Badge to access private areas with the latest PS4 PKGs.
PS4 CFW and Hacks       Thread starter PSXHAX       Start date Oct 29, 2018 at 7:39 AM       33      
Status
Not open for further replies.
Proceeding the PS4 Remote PKG Installer, PS4 RPI GUI by Sc0rpion and PS4RPI GUI by Sonik here's a PS4 Remote Sender GUI (Graphical User Interface) application for MacOS by @IH0kN3m written natively in the powerful and intuitive programming language Swift followed by an orbis.sh Linux Script from tonyyoyo. :pumpkin::evilsmile:

Download: PS4.Remote.Sender.app.zip / GIT

To quote from the README.md: PS4 Remote Sender

A simple GUI app for MacOs that I wrote for my use. Based on flat_z remote package installer project. Written natively in swift, good-to-go tool.

How to use:
  • Run remote package installer by flat_z
  • Enter PS4 IP address
  • Choose packages to install
  • Press SEND
  • Press STOP after installation is complete.
That's it! Enjoy :)

Note: Try to use simple package naming, as: Package.pkg for one pkg and Package_1.pkg, Package_2.pkg... for multi-part packages.

ToDo:

Add SimpleHttp server as option, as apache may be buggy and needs moving all .pkgs to hosted folder.

Cheers to @HydrogenNGU for the heads up on Twitter earlier today! :beer:
PS4 Remote Sender GUI Application for MacOS by IH0kN3m.png
 

Comments

@tonyyoyo can you explain how to use your script? I have a .pkg file on my desktop. I want to install that package on my Ps4 with your script.

I have installed webfs and downloaded your script on my desktop. So what is the next step?

If I type ./orbis.sh I get „/mnt/drive2/torrents/gg/ serve not found.“
 
1. Open the script with a text editor, and change the first 4 values to your preferences. I provided mine only as an example.

server_ip=192.168.1.135
server_port=8000
server_folder=/mnt/drive2/torrents/gg/serve
playstation_ip=192.168.1.126

For packages on the desktop, change server_folder to either ~/Desktop or /home/username/Desktop.

2. Install webfs and configure /etc/webfsd.conf with orbis.sh -i. It's okay if you've already installed webfs, the script will bypass this step and skip straight to configuration.

The order of these 2 steps are important. :alert:
 
The server_ip is just your local ip on the machine you installed webfs on. Also, make sure curl is installed.
  • hostname -I (get your ip)
  • sudo apt-get install curl
 
^ zecoxao works for me. (y)

orbis.sh v0.0.3
  • Added support for ETA (1h 43m 22s)
  • Added support for sorting by alphabetical (default was date modified)
  • Added curl to installation
Code:
#!/bin/bash

#v0.0.3

server_ip=192.168.1.135

server_port=8000

server_folder=/mnt/drive2/torrents/gg/serve

playstation_ip=192.168.1.126

sort_packages=date #or alphabetical

curl_timeout=5

progress_interval=0.5

shopt -s extglob

error_and_exit() {

[[ -z $1 ]] || echo "$1" 1>&2

exit 1

}

print_error() {

echo "$1" 1>&2

}

check_files() {

for i in "$@"; do

[[ -f $i ]] || error_and_exit "$i is not a file."

[[ $i = *[[:space:]]* ]] && error_and_exit "$i contains spaces."

done

}

convert_seconds() {

[[ $1 -gt 10000000 ]] && return 1

totalseconds=$1

seconds=$((totalseconds%60))

minutes=$((totalseconds/60%60))

hours=$((totalseconds/60/60%24))

days=$((totalseconds/60/60/24))

[[ $days -gt 0 ]] && printf '%dd ' $days

[[ $hours -gt 0 ]] && printf '%dh ' $hours

[[ $minutes -gt 0 ]] && printf '%dm ' $minutes

printf '%ds\n' $seconds

}

select_array() {

number_check() {

for n in "$@"; do

[ $n -gt ${#selections[@]} ] && { print_error "$n is too high."; return 1; }

[ $n -eq 0 ] && { print_error "0 is too low."; return 1; }

[[ $n = 0* ]] && { print_error "No need to add zeros to begining of number."; return 1; }

done

return 0

}

selections=("$@")

pad_number=$(echo -n ${#selections[@]} | wc -c)

for i in ${!selections[@]}; do

printf "%0${pad_number}d %s\n" "$((i + 1))" "${selections[$i]}"

done | tac 1>&2

until [ ! ${#numbers[@]} = 0 ]; do

echo -n '> ' 1>&2

read range

set -- $range

for i in $@; do

case $i in

+([0-9])-+([0-9]) )

startx=$(echo $i | cut -d- -f1)

stopx=$(echo $i | cut -d- -f2)

if [ $startx -gt $stopx ]; then

start=$stopx; stop=$startx

else

start=$startx; stop=$stopx

fi

number_check $start $stop || { unset numbers; continue 2; }

start=$((start - 1))

stop=$((stop - 1))

while [ $start -le $stop ]; do

numbers+=("$start")

start=$((start + 1))

done

;;

+([0-9]) )

number_check $i || { unset numbers; continue 2; }

numbers+=($((i - 1)))

;;

* ) print_error "$i is not a number."; unset numbers; continue 2

esac

done

done

for i in "${numbers[@]}"; do echo "${selections[$i]}"; done

}

case $1 in

-i ) for i in curl webfs; do

version=$(apt-cache policy $i | sed -n 's/^  Installed: \(.*\).*/\1/p')

[[ -z $version ]] || [[ $version = "(none)" ]] && { echo "Installing $i."; sudo apt-get -y install $i; }

done

[ -f /etc/webfsd.conf ] || error_and_exit "/etc/webfsd.conf is not found."

new=("$server_folder" "$server_port")

old=("web_root" "web_port")

for i in ${!old[@]}; do

grep -oq "^${old[$i]}=" /etc/webfsd.conf || error_and_exit "${old[$i]} is not found in configuration."

eval ${old[$i]}=$(grep "^${old[$i]}=" /etc/webfsd.conf | cut -d= -f2 | sed -e 's/^"//' -e 's/"$//')

[[ ${!old[$i]} = ${new[$i]} ]] || { echo "Changing ${old[$i]} to ${new[$i]}."; sudo sed -i 's|^'${old[$i]}'=.*|'${old[$i]}'="'${new[$i]}'"|' /etc/webfsd.conf; }

done

sudo systemctl restart webfs &> /dev/null

sudo systemctl enable webfs &> /dev/null

echo Finished.

;;

* ) [[ -d $server_folder ]] && cd "$server_folder" || error_and_exit "$server_folder not found."

readarray -t packages < <(ls $sort_packages *.pkg 2> /dev/null)

[[ ${#packages[@]} = 0 ]] && error_and_exit "$server_folder has no files."

readarray -t select_packages < <(select_array "${packages[@]}")

check_files "${select_packages[@]}"

case $sort_packages in

date ) sort_packages='-t1' ;;

alphabetical ) sort_packages='-1'

esac

for i in "${select_packages[@]}"; do

result=$(echo -n "{\"type\":\"direct\",\"packages\":[\"http://${server_ip}:${server_port}/${i}\"]}" | curl -s --max-time $curl_timeout "http://${playstation_ip}:12800/api/install" --data @-)

[[ -z $result ]] && error_and_exit "Curl timed out."

result_status=$(echo "$result" | sed -n 's/.*"status": "\([^"]*\).*/\1/p')

if [[ ! $result_status = success ]]; then

error_code=$(echo "$result" | sed -n 's/.*"error_code": \([^ ]*\).*/\1/p')

[[ $error_code = 0x80990015 ]] && { echo "$i: already installed"; continue; } || error_and_exit "$results"

fi

title=$(echo "$result" | sed -n 's/.*"title": "\([^"]*\).*/\1/p')

task_id=$(echo "$result" | sed -n 's/.*"task_id": \([^,]*\).*/\1/p')

progress_status=success

length_total=0

transferred_total=1

while [[ $progress_status = success ]] && [[ ! ${length_total/0x0/error} = $transferred_total ]]; do

sleep $progress_interval

progress=$(echo -n "{\"task_id\":$task_id}" | curl -s --max-time $curl_timeout "http://${playstation_ip}:12800/api/get_task_progress" --data @-)

progress_status=$(echo "$progress" | sed -n 's/.*"status": "\([^"]*\).*/\1/p')

length_total=$(echo "$progress" | sed -n 's/.*"length_total": \([^,]*\).*/\1/p')

transferred_total=$(echo "$progress" | sed -n 's/.*"transferred_total": \([^,]*\).*/\1/p')

hr_length_total=$(printf "%d\n" "$length_total" | numfmt --to=iec --format="%.2f")

hr_transferred_total=$(printf "%d\n" "$transferred_total" | numfmt --to=iec --format="%.2f")

seconds=$(echo "$progress" | sed -n 's/.*"rest_sec": \([^,]*\).*/\1/p')

hr_seconds=$(convert_seconds "$seconds")

echo -ne "$title: $hr_transferred_total/$hr_length_total (${hr_seconds:-N/A})\033[0K\r"

[[ -z $progress ]] && { echo; error_and_exit "Curl timed out."; }

done

echo

done

esac
Please add to main post.
 
Status
Not open for further replies.
Back
Top