[root@desktop18 lib]# rar e linuxso_20101113.rar
Extracting from linuxso_20101113.rar
Extracting libcrypto.so.4 OK
Extracting libssl.so.4 OK
Extracting libACE_SSL-5.7.2.so OK
Extracting libACE-5.7.2.so OK
All OK
[root@desktop18 lib]# cp lib
libACE-5.7.2.so libcrypto.so.4
libACE_SSL-5.7.2.so libssl.so.4
[root@desktop18 lib]# cp lib* /usr/lib/
[root@desktop18 Desktop]# cp fention /bin/
[root@desktop18 Desktop]# chmod +x /bin/fention
[root@desktop18 Desktop]# fetion
Usage:
--mobile=[mobile]
--sid=[sid]
--pwd=[pwd]
--config=[config file] *format:index mobile password
--index=[index no in config file,refer to sample.conf]
--debug *debug mode on
--hide *login fetion in hidden state
--to=[mobile/sid]
--command-path=[command file path]
--robotmode
--daemon(linux only)
--proxy-ip(http proxy ip)
--proxy-port(http proxy port)
--msg-gb=[gb2312/gbk message]
--msg-utf8=[utf8 message]
--msg-type=[0/1/2 sms longsms smartmsg]
--file-gb=[gb2312/gbk file]
--file-utf8=[utf8 file]
--query-cmcc-no
--auto-retry
--exit-on-verifycode
--t3key=[http://www.tui3.com/page/smssend/]
测试:
/bin/fetion --mobile=1871084**** --pwd=westos --to=1871084**** --msg-utf8="hello world"
图形验证码已经生成,文件名为:1871084****.jpg请识别后输入图形验证码:
qhdk
您输入的识别码是:qhdk
SIP-C/4.0 280 Send SMS OK
T: sip:427205233@fetion.com.cn;p=15209
I: 2
Q: 1 M
L: 112
D: Sat, 30 Mar 2013 13:08:32 GMT
XI: 19D094624BCF000FACC00C76C10C5792
结合shell脚本:
#!/bin/bash
#function: check httpd status, and send messeage to 1870184****
#author: oscersong007@gmail.com
while :
do
/etc/init.d/httpd status
if [ $? == "0" ]
then
continue;
else
/etc/init.d/httpd start > /dev/null
if [ $? == "0" ]
then
/bin/fetion --mobile=1871084**** --pwd=westos \
--to=1871084**** --msg-utf8="check httpd; status stop; and start it ok!"
else
/bin/fetion --mobile=1871084**** --pwd=westos \
--to=1871084**** --msg-utf8="check httpd; status stop; and start it failure; please check!"
fi
fi
sleep 10
done
转载于:https://my.oschina.net/sharelinux/blog/118729