Giter Club home page Giter Club logo

simonex's Introduction

Simonex

TL;DR

Simulated OnePassword Extension for using 1Password app extension during development.

Simonex running on iPhone X simulator

How it works

Simonex creates a single dylib which on load hooks via Objc's runtime into the current application under development and replaces findLoginForURLString:forViewController:sender:completion: to provide username and password with a single tap onto the 1Password icon.

F.A.Q

Q: How to insert/change username/password within Simonex?
A: Usernames and passwords are hardcoded and found in simonex.m. Customize _credentials within viewDidLoad, recreate the dylib, and restart your application or reload the dylib to let the changes take effect.

Q: Why hardcoded usernames and passwords?
A: Very simple to move username and password between simulators and devices without worrying about sandboxes and access rights, if the dylib could be loaded, username and password could be too.

Q: How to create the simonex.dylib?
A: Just call make and that should do the trick.

Q: Code signing of simonex.dylib did not work, what can I do?
A: Either call make dylib and sign manually via

codesign -f -s YOUR_CODESIGN_IDENTITY

or call

make CODESIGN_IDENTITY="Your iPhone Developer identity"

Q: How to install simonex.dylib?
A: Via Xcode and environment variables

DYLD_INSERT_LIBRARIES="/YOUR_PATH_TO/simonex.dylib"

or lldb

 exp (void *)dlopen("/YOUR_PATH_TO/simonex.dylib", 0x2)

Q: Why use a dylib with method swizzling instead of creating an iOS extension?
A: Less project overhead and very simple to use it on multiple simulators or devices without creating and installing an app exension every time.

Q: Will it run within the simulator only or on devices too?
A: Simonex runs on both simulator and devices.

Q: It doesn't run on the device/Xcode throws an error if DYLD_INSERT_LIBRARIES is used, what can I do?
A: To use it on a device, you have to copy simonex.dylib into the iOS application and adjust the path to the dylib accordingly.

Q: How can I automatically inject simonex.dylib via lldb?
A: Insert following lines into your .lldbinit file.

br set -S "+[OnePasswordExtension sharedExtension]" -o true -N simonex  
br command add  
exp (void *)dlopen("/YOUR_PATH_TO/simonex.dylib", 0x2)  
continue  
DONE  

To disable automatic lldb injection either delete above lines from your .lldbinit file or insert

br dis -N simonex  

to temporarily disable the breakpoint and therefore the code injection.
Use it in conjunction with Trampoline to inject simonex.dylib only for a specific target and/or architecture.

Q: Will it affect my AppStore app in any way?
A: Nope, Simonex runs only during development, either injected via Xcode or lldb.

simonex's People

Contributors

obayer avatar

Watchers

 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.