Giter VIP home page Giter VIP logo

cool-hacky-imessage-terminal's Introduction

iMessage-Terminal

Control your Mac through sending it text messages! This tool takes messages your Mac receives via the Messages app and executes them through the bash shell. Output is sent back to the user.

Installation

OS X 10.14+: disable rootless modeif you want this to work.

open -a messages.app

cd /Users/(whoami)/Library/Messages/Archive/

then cd into the directory of the current day. i.e. cd 2018-12-06

Copy messageClient.sh, getResponse.cpp, and messageSender.sh into to the current day's messages folder.

g++ getResponse.cpp

to run:

   while true; do bash messageClient.sh; sleep 3; done

Running commands through iMessage (iPhone as a terminal)

Change line 16 and 17 to your phone number, or wherever you'd like to recieve your terminal output.

If you want to execute a command, just message your command to yourself, followed by a semicolon, and it will be executed!

texting your computer say hi; will make it say hi. ls; lists current directory, etc. Be creative!

Notes

It seems that approx. 15 seconds after Messages receives a text, it writes the chat to a '.ichat' "binary1"-formatted file in the current day's directory. So, I convert the .ichat file to xml1 and parse through that resulting document, noting that the last received text is located two strings before an "NSArray", "NSMutableArray", or "InstantMessage" string declaration, AND directly before a hyphenated string declaration. C++ Does the string parsing.

shown below: the last message, "say 4;" can be found 2 strings before the "InstantMessage" string, and 1 string before the hyphenated string. (Perhaps this is an ID for that specific message...)

alt text

cool-hacky-imessage-terminal's People

Contributors

huntersgordon avatar

Stargazers

 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.