Giter VIP home page Giter VIP logo

twitterinject's Introduction

twitterinject

Returns true for all possible feature flags within the Twitter Mac app!

On Apple platforms, the default feature flags are present within three files:

  • fs_embedded_defaults_production.json
  • fs_embedded_defaults_ipad_production.json
  • fs_embedded_defaults_mac_production.json

Keys look like the following:

"_4dnl" : {
    "value" : false
}

These can vary from integer values, dictionary values, and Boolean values. (This limit isn't exhausted - there's quite a few.)

To find what a key represents, disassemble T1Twitter.framework. Search for xrefs to the key you're attempting to determine. You'll find their code typically represents the following:

@implementation TTACoreAnatomyFeatures
-(bool)isTFNReactionsPickerEnabled {
    TFSFeatureSwitches* switches = [self featureSwitches];
    return [switches boolForKey:@"_4dnl"];
}
@end

We can take advantage of the shared TFSFeatureSwitches logic and simply return true for all keys.

As of writing, this repository only returns false for _k3i1 - an apparent feature switch for requesting notification access in the background. This fails on macOS and crashes the app.

Similarly (as of writing, with Twitter version 8.82), attempting to send voice DMs will fail as Twitter has not declared NSSpeechRecognitionUsageDescription and is killed by TCC.


Building

SIP will need to be disabled for DYLD_INSERT_LIBRARIES to function properly. You can also codesign --remove-signature /Applications/Twitter.app and go from there, but the Twitter app may act oddly without various keychain credentials allowed. Use at your own risk.

Beyond that, make run and enjoy! You may find that at times the Twitter app will forcibly log you out when certain features are not enabled.

twitterinject's People

Contributors

spotlightishere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.