Code Monkey home page Code Monkey logo

ios-scripts's Introduction

iOS Scripts

A collection of scripts I wrote that have something to do with iOS.

Script Description Dependencies
jcache Rebuild file hierarchy from a dyld_shared_cache. jtool
mbdb ls -la with original file names for a MobileBackup. Python
mbdump Rebuild file hierarch from a MobileBackup. mbdb
mkdeb Tiny & crude script to make .deb files. ar, ``tar`
shsh2apt Extract an apticket.der from an SHSH plist. plutil, xmllint, base64
unlib Extract and rebuild dyld_shared_cache from an OTA bundle. jcache, unzip, unxz, grep, OTAPack

Unless otherwise noted, all scripts are bash scripts and will require bash to run.

License

Unless otherwise noted at the top of a file itself, all files in this repository were written by me and are placed in the public domain.

Aliases

There are also a few things I use that are too short for their own scripts, but I find wicked useful.
I placed these in my ~/.profile, either as alias or as variable assignments.

Never type the SDK path again:

iSDK='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk';

Compile for iOS with igcc:

alias igcc='xcrun -sdk iphoneos gcc -Wall -arch armv7 -arch arm64';

Self-sign a binary with entitlements, using isign ent.plist binary:

isign()
{
    codesign -s - --entitlements "$2" "$1";
}

Dump any ASN.1 file in DER format (e.g. every img4 file ever) with asn1dump:

alias asn1dump='openssl asn1parse -i -inform DER -in';

Convenient SSH over USB

I find it annoying to get my phone's local WLAN IP every time I connect to it, and I find it annoying to enter a password every time.
Here's how to get rid of both of these:

  • Install libusbmuxd to get iproxy.
  • Add the public key of your PC to /var/mobile/.ssh/authorized_keys on your phone.
  • Add this entry to ~/.ssh/config on your PC:
Host iphone
    HostName 127.0.0.1
    Port 2222
    User mobile
    StrictHostKeyChecking no
    UserKnownHostsFile /dev/null

Now

  • Plug in your phone over USB.
  • Run iproxy 2222 22 and leave it open.
  • In a new tab/window, run ssh iphone.

If done right, it won't ask for a password ever again1.


1 Except if the device was rebooted and has not yet been unlocked for the first time, because at that point /var/mobile/.ssh/authorized_keys is still encrypted and not readable.

ios-scripts's People

Contributors

siguza avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.