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

I got a Linux script in the pipe, so get ready for that. :geek:
  • Progress indicator (3.33GB/41.23GB)
  • Support for queuing packages
  • Curl and webserver are the only dependencies
 
Here it is!
  1. Enter your details at the top of the script
  2. Install webfs with the -i switch
To get a list of package files, simply run the script. A selection can be a range or a series of numbers.

JP9O7cTM_o.png

cdoOMkWJ_o.png
Code:
#!/bin/bash

#v0.0.2

server_ip=192.168.1.135

server_port=8000

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

playstation_ip=192.168.1.126

curl_timeout=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

}

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

unset select_option

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 ) version=$(apt-cache policy webfs | sed -n 's/^  Installed: \(.*\).*/\1/p')

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

[ -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 -t1 *.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[@]}"

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 1

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")

echo -ne "$title: $hr_transferred_total/$hr_length_total\033[0K\r"

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

done

echo

done

esac
 
Thanks guys ;)

@olertolert, well, as text suggests, you be sure that you connected to wifi network (it does not support LAN connections). If it's not the case, make sure that wifi interface is en0 (en0 is interface for wifi by default): hold alt (options) key and press wifi icon on up-right corner of screen, first row must be like: Interface Name: en0. If it's not en0, well, you can say what it is and I'll include searching there too.

@azoreseuropa, you can "install" any .pkg files for PS4, but that doesn't mean that you can "start" all of them. Only fpkg can be started, as always.
 
My installation also updates the configuration file for webfs located at /etc/webfsd.conf, so any changes to server_folder or server_port will require you to run orbis.sh -i again.
 
Status
Not open for further replies.
Back
Top