This is an automated archive made by the Lemmit Bot.

The original was posted on /r/jailbreak by /u/phoenixlegend7 on 2024-04-03 08:46:50.


Tutorial Tools attachment (see below for more details):

Apps you’ll need:

Download and install iSH app version 1.3.2 from the App Store (it should be compatible with iOS 11+).

1) You can run directly ChatGPT through the iSH app (no ChatGPT API is needed) but it requires to install python and some python packages. It does take time to install python packages on it, so you can choose which path you prefer:

Fast way:

I saved you some time and made a backup of my fresh install of iSH that includes all the python packages it needs:

You will find it inside the attachment: chatgpt\iSH backup*app.ish.iSH_20240402211718.adbk*.

Using Apps Manager (version 1.8.2-5), make a backup of iSH - Click on it so it takes you to the backup file location in Filza (version 4.0.1-4). Now you want to replace that file with the file above, just keep the same name it gave your backup file, so you can easily then click wipe and then restore so it restores my backup file.

Slow way:

Run the following commands in your iSH:

apk add build-base

apk add clang

apk add clang-doc

apk add nasm

apk add nasm-doc

apk add python3

apk add --update py-pip

apk add python3-dev

pip install g4f <= this command could take couple of hours or more to complete!

2) Now you want to mount an ios folder with the iSH app so you can easily drop files with Filza.

To do that, open iSH, if you used my backup you should already have a a folder called mnt (and inside it a folder called docs). You can use ls and “cd mnt” “cd docs” or “cd …” to see and navigate between the folders. If you use your copy, you can create it with this command: “mkdir -p /mnt/docs”.

Now go inside the mnt folder and run this command: mount -t iOS . docs, this will launch the Files app and ask you to choose a location, choose “On my iPhone” and click the + to create a new folder, which you want to call: “ish_mount” and select it. If you did it correctly, run the “mount” command and it should list all mounts and one of them should be the one you just did along with the iOS folder path it uses. It will look like this if you did it correctly:

iPhone:~# mount

/private/var/mobile/Containers/Shared/AppGroup/7E5DDECE-89DA-4822-AB94-7336F9402CB2/File**\040Provider\040**Storage/ish_mount on /root/mnt/docs type ios (rw)

The bold part is unique folder for your phone. Also the two bold parts of \040 is a unicode for space character, so the actual iOS folder mount in this example is:

/private/var/mobile/Containers/Shared/AppGroup/7E5DDECE-89DA-4822-AB94-7336F9402CB2/File Provider Storage/ish_mount

3) Enable WebDav Server in Filza and go to that iOS folder from your PC web browser (I suggest you bookmark it and also add this path to your Filza favorites on your phone).

You want to use the upload button to upload the following two files:

a) The python script I wrote that’s inside the attachment: chatgpt[chatgpt.py](https://chatgpt.py)

b) You want to obtain the .HAR file for your ChatGPT account, which can be done as follows from your PC Chrome web browser:

.HAR File for OpenaiChat Provider

Generating a .HAR File

To utilize the OpenaiChat provider, a .har file is required from https://chat.openai.com/. Follow the steps below to create a valid .har file:

  1. Navigate to https://chat.openai.com/ using your preferred web browser and log in with your credentials.
  2. Access the Developer Tools in your browser. This can typically be done by right-clicking the page and selecting “Inspect,” or by pressing F12 or Ctrl+Shift+I (Cmd+Option+I on a Mac).
  3. With the Developer Tools open, switch to the “Network” tab.
  4. Reload the website to capture the loading process within the Network tab.
  5. Initiate an action in the chat which can be capture in the .har file.
  6. Right-click any of the network activities listed and select “Save all as HAR with content” to export the .har file.

4) You should now be able to start using ChatGPT by simply re-opening the iSH app and typing there:

python3 ./mnt/docs/chatgpt.py

It will show you a prompt:

You: [Your question goes here]

Which expects you type something, send it and then you should receive a response showing as:

GPT: [Answer]

If you want to quit the conversation, simply send: “exit” or just close the iSH app.

It should store history of the conversations by the current date inside, i.e.:

/mnt/docs/chatgpt_conversations/04-02-2024.txt

As well as the last response and the response status:

/mnt/docs/gptResponse.txt

/mnt/docs/gptResponseStatus.txt

Optional: Add Siri and shortcuts support (if your iOS/jailbreak supports it):

Apps/Tweaks/Shortcuts you’ll need:

  • iOS Shortcuts app
  • Powercuts version 1.1, Powercuts Actions Pack version 1.2 and AutoTouch version 8.0.12 - This adds support for additional actions/automation sequence that can be executed in the Shortcuts app, specifically for the Shortcuts I provide below. It’s recommended that inside Powercuts tweak settings, you enable the “Hide top progress banner”, so you don’t see it when running shortcuts.
  • pasteToIshAndRun.lua - This is an AutoTouch recording that will run iSH with the ChatGPT command needed for the shortcut. It’s referenced in the shortcuts below. Place it inside the AutoTouch records folder inside: /var/mobile/Library/AutoTouch/Scripts/Records.
  • Set ISHPath.shortcut - This shows an input box to enter your ish iOS mount folder - Mandatory to run and setup for the other shortcuts to work! Expected value format example: /private/var/mobile/Containers/Shared/AppGroup/7E5DDECE-89DA-4822-AB94-7336F9402CB2/File Provider Storage/ish_mount
  • Show ISHPath.shortcut - This shows your the current value you entered for the iSH iOS mount folder.
  • Text ChatGPT.shortcut - This shows an input box to enter your question - Can be either opened directly or called through Siri with “Text ChatGPT”.
  • Ask ChatGPT.shortcut - This allows you to dictate your question verbally - Can be either opened directly or called through Siri with “Ask ChatGPT”.
  • Send ChatGPT.shortcut - This is used by the previous shortscuts don’t call directly, except it’s using the default of voice as a response from Siri, change the default “voice” value inside it to “text” if you prefer a text response from Siri.
  • Wait For ChatGPT Answer.shortcut - This is used by the previous shortscuts don’t call directly
  • Give ChatGPT Answer.shortcut - This is used by the previous shortscuts don’t call directly
  • Is App Running_.shortcut - Used by the previous shortcuts to determine if there is an active iSH session going so it doesn’t start over.

Enjoy!