当前在线人数8040
首页 - 分类讨论区 - 海外生活 - 手机计划版 -阅读文章
未名交友
[更多]
[更多]
文章阅读:分享几个用于自由泡的脚本
[同主题阅读] [版面: 手机计划] [作者:llaalways] , 2017年12月08日12:55:48
llaalways
进入未名形象秀
我的博客
[上篇] [下篇] [同主题上篇] [同主题下篇]

发信人: llaalways (熊大), 信区: CellularPlan
标  题: 分享几个用于自由泡的脚本
发信站: BBS 未名空间站 (Fri Dec  8 12:55:48 2017, 美东)

第一个:自动恢复credit。
自由泡真是鸡贼之王,你花了钱,它给你的账号里放点topup credit。
过一段时间,你账号里的credit就失效了。
你可以去恢复,但如果有好几个账号,一个个恢复也得花不少时间。
我编了个脚本,去恢复个个账号的credit。
但这个脚本只能恢复,不能预防,如果credit还没失效,过一遍也没关系。
文本链接:
https://drive.google.com/file/d/1v9MNsD_aR9X_AWJz9gaHKSCSvKMwwxBT/view?usp=
sharing


#!/bin/sh
# open a cygwin command window and run ./fpcredit.sh. check results in
Credit.html.
Accounts=2
Acc[0]="[email protected]"
Acc[1]="[email protected]"
PASS[0]="fppassword000"
PASS[1]="fppassword001"

FPLOGIN="https://www.freedompop.com/login.htm"
FPSHARE="https://www.freedompop.com/billing/reactivateCredit"
CURLHEAD="Content-Type: application/x-www-form-urlencoded; charset=UTF-8"
UA="Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/56.0.2924.87 Safari/537.36"
COOKIE='/tmp/fpcookie.cookie'
echo " " >Login.html
echo " " >Credit.html
iacc=0
while [ $iacc -lt $Accounts ]
do
   rm -f ${COOKIE}
   curl --silent -k -L -A "${UA}" -H "${CURLHEAD}" ${FPLOGIN} -d "signin-
username=${Acc[$iacc]}&signin-password=${PASS[$iacc]}" -c "${COOKIE}" >>
Login.html
   curl -s -k -L -A "${UA}" -H "${CURLHEAD}" ${FPSHARE} -b "${COOKIE}"  >>
Credit.html
   iacc=`expr $iacc + 1`  
done

第二个:自动拨号,维持抽屉电话卡,或抽屉手机活着。
现在FP已经没有赠送流量的优惠了,保留只有流量的抽屉设备已经没有必要了。
我已经用这个帖子里说的办法清理了我所有的只有流量的抽屉设备。
http://www.mitbbs.com/article_t0/CellularPlan/95479.html
但电话卡,或电话留着还可能有点作用。
如果你长期不用,FP就会deactive设备,还可能收1分钱管理费。
你可以reactive你的设备,但又要重新选号,很麻烦。
并且重新选号后,你的VOIP的账号和密码就都变了。
我搞了个脚本,可以通过VOIP把所有抽屉有语音服务的设备逐个打一个电话。

首先要搞到VOIP的账号和密码, 宝典里有攻略。
http://www.mitbbs.com/article_t2/CellularPlan/5857.html

然后按这里的要求安装sipcmd
https://github.com/tmakkonen/sipcmd
这里有编译好的sipcmd
https://drive.google.com/file/d/18H77Ytj80rsbtl_T2qJvXTk-SkBvW27A/view?usp=
sharing

最后才是我的脚本
https://drive.google.com/file/d/1IWC6WHZg1YPM5_X2NPAo7qZLJgoW9kUp/view?usp=
sharing

#!/bin/sh
# install https://github.com/tmakkonen/sipcmd
./sipcmd -P sip -u 1234567890_89011703278097123456 -c
25532c5c223ea13b09ba1a454b4dcdf9 -w fp.layered.net -x "c18004444444;ws3000;h"
./sipcmd -P sip -u 1234567891_89011703278097123456 -c
25532c5c223ea13b09ba1a454b4dcdf9 -w fp.layered.net -x "c18004444444;ws3000;h"

其中
-u 后面是 电话号码_ICCID
-c 后面是 密码。
-x 后面的引号里面 c后面的18004444444是被骚扰的电话,
可以换成你想要骚扰的电话,一定要是自动接通的电话,
美国电话要从1开始后面加10位号码。

使用后可以在以下页面查使用情况
https://my.freedompop.com/usage

下面是我运行sipcmd后屏幕上的输出显示:
Starting sipcmd
in debug mode
Manager
Init
initialising SIP endpoint...
TestChanAudio
TestChanAudio
Listening for SIP signalling on 0.0.0.0:5060
SIP listener up
registered as sip:[email protected]
Created LocalEndPoint
Main
## Call ##
TestPhone::Main: calling "18004444444" using gateway "fp.layered.net" at Sat
Jan 20 20:04:36 2018

Setting up a call to: sip:[email protected]
LocalEndpoint::MakeConnection
LocalEndpointCreateConnection
LocalConnection
OnIncomingConnection: token=L8daf02122
connection set up to sip:[email protected]
TestPhone::Main: calling "sip:[email protected]" for 0
TestPhone::Main: calling "sip:[email protected]" for 0
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 1
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 2
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 3
TestPhone::Main: calling "sip:[email protected]" for 4
TestPhone::Main: calling "sip:[email protected]" for 4
OnOpenMediaStream
recording media from sip
CreateMediaStream
TestChannel[ Call[C2ded6ffe1]-EP<local>[Ld370178d2] - 0x7f02ec0335a0 ]
OnOpenMediaStream
streaming media to local
TestChannel::Write
TestChannel::Write
CreateMediaStream
TestChannel[ Call[C2ded6ffe1]-EP<local>[Ld370178d2] - 0x7f02ec04da60 ]
OnOpenMediaStream
recording media from local
OnOpenMediaStream
streaming media to sip
TestPhone::Main: calling "sip:[email protected]" for 4
Segmentation fault (core dumped)


看起来像是出错了,但其实打通了。

还有一个重新激活抽屉电话卡,或抽屉手机的脚本,但估计没什么用。







--
※ 修改:·llaalways 於 Jan 20 21:24:22 2018 修改本文·[FROM: 68.]
※ 来源:·WWW 未名空间站 网址:mitbbs.com 移动:在应用商店搜索未名空间·[FROM: 141.]

[上篇] [下篇] [同主题上篇] [同主题下篇]
[转寄] [转贴] [回信给作者] [修改文章] [删除文章] [同主题阅读] [从此处展开] [返回版面] [快速返回] [收藏] [举报]
 
回复文章
标题:
内 容:

未名交友
将您的链接放在这儿

友情链接


 

Site Map - Contact Us - Terms and Conditions - Privacy Policy

版权所有,未名空间(mitbbs.com),since 1996