星期五, 十一月 6

两个飞信接口

http://sms.api.bz/fetion.php?username=号码&password=口令&sendto=接收方&message=内容
https://fetionAPI.appspot.com/api/?from=号码&pw=口令&to=接收方&msg=短信内容


在linux下可以用curl来执行,这样很容易写出脚本,好像短时间发送太多可能封ip。

这是一个用python写的cli版本,注意一下引号的事,改了好几回~

#!/usr/bin/env python3
# coding=utf8
import os;
print('Input your number, passward, the other number and message:')
umame = input()
pw = input()
sendto = input()
msg = input()
str = 'curl ' + '"http://sms.api.bz/fetion.php?username=' + umame + \
'&password=' + pw + '&sendto=' + sendto + '&message=' + msg + '"'

os.system(str)

input()

还有一个事,message中不能有空格,加引号也不行,只能用%20代替

没有评论:

发表评论