Giter VIP home page Giter VIP logo

message-shell's Introduction

实现功能: Mac Login → 给指定手机发短信

步骤简介:

  1. 注册阿里大于,设置好签名和模板
  2. 一个shell脚本: Login.sh
  3. 一个php脚本: message.php
  4. 设置Mac开机运行 Login.sh

文件介绍

  • message.php 作用: 短信服务是要收费的 5分钱一条. 涉及到钱就必须注意使用安全. 阿里大于通信服务必须进行加密. 这个加密用shell脚本实现很麻烦.所以就用php了.

  • login.sh 作用: 这个脚本是给Mac 电脑开机启动用的.

Mac电脑开机运行脚本有两种方式. 一种是修改plist 一种是终端输入特定命令.(我们用这种)

Mac 开机运行脚本:

我们才用的方法 只能开机运行一个脚本. 终端下输入下面命令就可以.

  1. 查看现有的开机运行脚本 sudo defaults read com.apple.loginwindow LoginHook

  2. 删除现有的开机运行脚本 sudo defaults delete com.apple.loginwindow LoginHook

  3. 把某个脚本加入到开机运行 sudo defaults write com.apple.loginwindow LoginHook '/Users/v/Desktop/sh/Login.sh' (/Users/v/Desktop/sh/Login.sh 改成你自己 shell 脚本的位置)

Login.sh

把php 后面的路径. 换成你php脚本的路径就可以了

message.php

带有❤️的 都是要填你自己的阿里大于帐号里面的信息.

message-shell's People

Contributors

homeless-xu 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.