Code Monkey home page Code Monkey logo

sms-token's Introduction

SMS TOKEN READER (MacOS only)

Read SMS token and save it to clipboard.

1. Motivation

It saves me ton of time when connecting to various VPNs, filling SSO creds etc.

2. Prerequisites

If any is a NO, it will not work for you.

  1. Have go installed (coz I'm not uploading binaries)
  2. Be iPhone user
  3. Be Mac user
  4. SMS with token fits in one of these 2 templates:
    1. Token code: {TOKEN}
    2. Use verification code {TOKEN} for Microsoft authentication.
    • Want more? Send me your SMS and we add it as template.
  5. Your terminal must have full disk access
    • Why? To read messages database, which is in ~/Library/Messages.
    • How to set it: System Settings โžก Privacy & Security โžก Full Disk Access
    • Test it. This command shall return some SMS(s):
      ๐Ÿ“Ÿ make test-db

3. Usage

3.1 Build it

๐Ÿ“Ÿ make build

3.1 Test it

In repo root, run:

๐Ÿ“Ÿ make test-ride

# you get a message like:
  :: token '435359' copied to clipboard (16 seconds old)
# or:
  :: token is too old (31 minutes), try again

3.2 (Optional) Install it system-wide

# 1. Install
๐Ÿ“Ÿ make install
# - creates shell script $REPO/bin/token
# - creates symlink $REPO/bin/token -> /usr/local/bin/token

# 2. Run it anywhere
๐Ÿ“Ÿ token

# 3. Uninstall
๐Ÿ“Ÿ make uninstall
#ย - this will delete symlink /usr/local/bin/token

4. How does it work?

Using sqlite3 CLI we read messages DB (synced between iOS+MacOS) and then parse message text + timestamp. Newest message wins.

sms-token's People

Contributors

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