Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

barracuda156

macrumors 68030
Original poster
Sep 3, 2021
2,822
1,782
This is something I found to be fun, though may not be of great utility, unless you have a keyboard for iPhone.

Procedure allows to have a command-line access to a PowerPC Mac from an iOS device (or in fact any device with a Unix-like OS) and vice versa, including logging in as root with full access to file system (with the exception of iOS: there is no root user). It should work for file transfer as well, but I did not yet test this part. No network set-up is needed, no physical connection, but both devices should be connected to internet (possibly from behind a firewall). No jailbreak needed on iOS.

On an iOS device:
1. Install iSH (free and open-source) from App Store normally.
2. Launch it, run the following:
Code:
apk add musl-dev openssl openssl-dev autoconf automake libtool pkgconf zlib libgcc gcc make git
That will download and install all this stuff into emulated Linux. (Its filesystem is accessible from iOS via Files app.)
3. Optionally create a suitable directory and cd to it (normal Unix commands work as expected), otherwise use default `/root`, from there:
Code:
git clone https://github.com/hackerschoice/gsocket
cd gsocket
4. Compile gsocket:
Code:
autoconf
./configure
make all
make install
This installs binaries into standard Unix directory (/usr/bin) which is on the PATH. Set-up done.

On a PowerPC machine:
1. Install my PPCPorts from macos-powerpc.org or mainstream MacPorts (the latter needs minimal tweaking for this to work). Hopefully you already have either of these, it does not really matter which.
2. With PPCPorts:
Code:
sudo port -vN install gsocket
On 10.6.8 ppc that should install pre-built package. On 10.4–10.5 it will build it from source. Dependencies are minimal (autoconf, automake, libtool, zlib, pkgconfig, openssl), so it should be rather quick even on slower hardware.
With mainstream MacPorts: make a local overlay repository, create `net` directory in it and place `gsocket` port there: https://github.com/macos-powerpc/powerpc-ports/tree/main/net/gsocket
Then run `sudo port sync` and `sudo port -vN install gsocket`.
Set-up done.

On a target machine (PowerMac in this example) run this from a normal user (root is fine, but unneeded):
Code:
gs-netcat -s [insert_your_arbitrary_secret_code] -l -i
This starts gsocket session that will wait for client to connect.

On a client machine (iPhone in this example) run:
Code:
gs-netcat -s [the_same_secret_code] -i
This logs you in to the target. (Running a command that requires root privileges will prompt for root password, as expected.)
 

Attachments

  • gs2.jpeg
    gs2.jpeg
    155.7 KB · Views: 19
  • gs1.jpeg
    gs1.jpeg
    241.2 KB · Views: 10
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.