首先,使用USB网络共享\WIFI等方式使手机和电脑处于同一局域网。然后在手机上安装org.myklos.sendmessage这个App,并开启Server。(群发器已经打包了汉化版)
英文原版org.myklos.sendmessage.zip
打开手机软件上的地址,比如http://192.168.42.129:8080/ 看到内容即可开始使用。
在电脑上打开软件,填写上短信服务器地址即可开始使用。
参数:记录到文件,会把每一条记录写到文件
慢速发送,1秒一条,推荐手机慢的勾选
接口:
http://[服务器地址]/send/?pass=[密码 可空 ]&number=[号码]&data=[UTF-8 URLEncode的正文]&submit=&id=
php版
<?php $number = "10001"; //号码 $content = "测试thinkai.net"; //正文 $host = "192.168.42.129:8080"; //服务器地址 $pass = ""; //密码 $data = urlencode($content); //转码 $send = file_get_contents("http://$host/send/?pass=$pass&number=$number&data=$data&submit=&id="); //调用接口 $result = (explode("\n",$send)); //分割结果 echo str_replace("STATUS: ","",$result[0]); //显示状态 ?>
Autohotkey版
#NoTrayIcon ;转码函数 urlencode(string){ clip := ClipboardAll Clipboard = %string% Transform, string, Unicode Clipboard := clip StringLen, len, string SetFormat, IntegerFast, hex Loop { if A_Index > %len% Break StringMid, out, string, %A_Index%, 1 hex := Asc(out) hex := hex * 0x01 StringReplace, hex, hex, 0x, , All content = %content%`%%hex% } SetFormat, IntegerFast, d Return content } number = 10001 ; //号码 content = 测试thinkai.net ; //正文 host = 192.168.42.129:8080 ; //服务器地址 pass = ; //密码 data := urlencode(content) ; //转码 URLDownloadToFile, http://%host%/send/?pass=%pass%&number=%number%&data=%data%&submit=&id=, %A_Temp%\send.tmp FileRead, result, %A_Temp%\send.tmp StringSplit, result, result, `n ; //分割结果 StringReplace, status, result1, STATUS:%A_Space%, , MsgBox, 64, 结果, %status%
群发器源码
#NoTrayIcon ;不显示图标 FileInstall, org.myklos.sendmessage.apk, 网关服务器.apk ;打包文件 ;创建界面 Gui, Add, Text, x6 y7 w140 h50 , 短信网关地址`n例192.168.42.129:8080`n一行一个 Gui, Add, Edit, x6 y57 w140 h80 vgate, 192.168.42.129:8080 Gui, Add, CheckBox, x6 y137 w140 h20 vlog, 记录发送记录到文件 Gui, Add, CheckBox, x6 y157 w140 h20 vslow, 慢速发送 Gui, Add, Text, x146 y7 w100 h20 , 发送号码 Gui, Add, Edit, x146 y27 w100 h150 vhm Gui, Add, Text, x246 y7 w370 h20 , 短信内容 Gui, Add, Edit, x246 y27 w370 h150 vnr Gui, Add, Text, x6 y177 w240 h60 vshow Gui, Add, Button, x246 y177 w370 h60 gsend, 开始发送 Gui, Show,h246 w626, 群发短信单体版 ;检查是否使用过 加载上次填写的服务器地址 IfExist, gate.ini { FileRead, gate, gate.ini GuiControl, , gate, %gate% } ;转码函数 urlencode(string){ clip := ClipboardAll ;剪切板转存 Clipboard = %string% Transform, string, Unicode ;获取UTF-8 Clipboard := clip StringLen, len, string SetFormat, IntegerFast, hex ;运算结果为HEX Loop { if A_Index > %len% Break StringMid, out, string, %A_Index%, 1 hex := Asc(out) ;获取单字节ascii值 hex := hex * 0x01 StringReplace, hex, hex, 0x, , All content = %content%`%%hex% } SetFormat, IntegerFast, d ;运算结果为是静止 Return content } Return Send: ;从界面取回内容 GuiControlGet, hm GuiControlGet, nr GuiControlGet, gate GuiControlGet, log GuiControlGet, slow ;处理填写内容 IfNotInString, hm, `n { number0 = 1 number1 = %hm% } Else { StringReplace, hm, hm, `r, , All hm = %hm%`n StringReplace, hm, hm, `n`n, , All StringSplit, number, hm, `n } IfNotInString, gate, `n { gate0 = 1 gate1 = %gate% } Else { StringReplace, gate, gate, `r, , All gate = %gate%`n StringReplace, gate, gate, `n`n, , All StringSplit, gate, gate, `n } ;初始化 id = 0 success = 0 time = %A_Now% data := urlencode(nr) ;urlencode Loop { if A_Index > %number0% Break tmpnumber = % number%A_Index% if tmpnumber <> { StringReplace, tmpnumber, tmpnumber, -, , All b := tmpnumber/1 IfInString, b, .000000 { id += 1 if id > %gate0% id = 1 host = % gate%id% pass = ; //密码 GuiControl, , show, 网关:%host%`n号码:%tmpnumber%`n序号:%A_Index%`n ;显示 URLDownloadToFile, http://%host%/send/?pass=%pass%&number=%tmpnumber%&data=%data%&submit=&id=, %A_Temp%\send.tmp ;执行并抓回结果 FileRead, result, %A_Temp%\send.tmp StringSplit, result, result, `n ; //分割结果 StringReplace, status, result1, STATUS:%A_Space%, , GuiControl, , show, 网关:%host%`n号码:%tmpnumber%`n序号:%A_Index%`n状态:%status% if status = STATUS_OK success += 1 if log = 1 FileAppend, 网关:%host%`,号码:%tmpnumber%`,序号:%A_Index%`,状态:%status%`,时间:%A_Now%`n, %time%.log if slow = 1 sleep, 1000 ;Else ;sleep, 100 } } } GuiControl, , show, 共计发送%number0%条短信,其中成功%success%个! FileDelete, gate.ini FileAppend, %gate%, gate.ini Return GuiClose: ExitApp
安卓HTTP短信群发.zip 含汉化版org.myklos.sendmessage.apk
#NoTrayIcon ;不显示图标 IfNotExist, 内外网双用路由.cmd ;检测文件是否存在 { SplashTextOn, 200, 40, 提示, 获取网络信息中! ;悬浮窗口 RunWait, %ComSpec% /c ipconfig /all >%A_Temp%\ip.tmp, , Hide ;获取ipconfig file = %A_Temp%\ip.tmp ;定义路径 index = 8 ;定义FileReadLine起始行 id = 0 ip := Object() ;初始化数组 gateway := Object() name := Object() Loop { index += 1 FileReadLine, line, %file%, %index% ;循环读取每一行到line变量 if errorlevel Break if line <> ;不为空 { line = `n%line%`n ;加上首位界限 head := RegExMatch(line, "\n[^\s].*\s.*:\n") ;正则表达式检测适配器标题 if head = 1 ;如果是 { id += 1 ;网卡id+1 name[id] := RegExReplace(line, "\n([^\s].*):\n", "$1") ;正则替换获取适配器名称并添加到数组 } Else { testip := RegExMatch(line, "\n.*(IPv4 地址|IP Address).*:\s\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}.*\n") ;匹配有地址的ip testip2 := RegExMatch(line, "\n.*(IPv4 地址|IP Address).*:.*\n") ;匹配无地址的ip 地址为空的情况下 testip3 = %testip%%testip2% ;连接两个变量 if testip3 = 11 ip[id] := RegExReplace(line, "\n.*(IPv4 地址|IP Address).*:\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*\n", "$2") ;获取ip并添加到数组 if testip3 = 01 ip[id] = testgw := RegExMatch(line, "\n.*(默认网关|Default Gateway).*:\s\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}.*\n") testgw2 := RegExMatch(line, "\n.*(默认网关|Default Gateway).*:.*\n") testgw3 = %testgw%%testgw2% if testgw3 = 11 gateway[id] := RegExReplace(line, "\n.*(默认网关|Default Gateway).*:\s(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*\n", "$2") if testip3 = 01 gateway[id] = } } } SplashTextOff ;关闭悬浮窗口 ;创建界面 gui, add, text, x0 y0 w720 h20, 请选择对应的网络适配器并分别设为内网、外网 gui, add, text, x0 y20 w60 h20, 内网: gui, add, text, x60 y20 w300 h20 vnei, gui, add, text, x360 y20 w60 h20, 外网: gui, add, text, x420 y20 w300 h20 vwai, gui, add, button, x0 y40 w360 h20 gsetnei, 设为内网 gui, add, button, x360 y40 w360 h20 gsetwai, 设为外网 gui, add, ListView, x0 y60 w720 h100 vlist, ID|网卡名称|IP地址|默认网关 gui, add, text, x0 y160 w720 h20, 静态路由设置(可复制到CMD直接执行或另存为.bat批处理 当然,下次打开程序会自动执行下面的路由的) gui, add, edit, x0 y180 w720 h50 vroute, route delete 0.0.0.0 gui, add, button, x0 y230 w240 h20 gsubmit, 提交 gui, add, button, x240 y230 w240 h20 gsexec, 提交并立即执行 gui, add, button, x480 y230 w240 h20 ghelp, 帮助 gui, show, , 内外网双用初始化设置 Powered by Thinkai ;添加网卡信息到列表 loop { if A_Index > %id% ;到头退出 break n := name[A_Index] ;赋值临时名称 i := ip[A_Index] ;赋值临时ip g := gateway[A_Index] ;赋值临时网关 if i <> LV_Add("", A_Index, n, i, g) ;添加ip不为空的网卡信息 ""为图标 } LV_ModifyCol() ;自动调整列宽 } Else { MsgBox, 4100, 询问, 请问是否继续设定好的信息执行内外网双用?, 5 ;5秒超时 IfMsgBox, Yes ;选是 goto, exec ;跳到exec标签 IfMsgBox, Timeout ;超时 goto, exec IfMsgBox, no ;选否 { FileDelete, 内外网双用路由.cmd ;删除 Reload ;重载 } } Return setnei: ;设置内网 ;获取选中行信息 FocusedRowNumber := LV_GetNext(0, "F") if not FocusedRowNumber ;没有焦点 { MsgBox, 4144, 提示, 您未选中任何网卡! Return } LV_GetText(idx, FocusedRowNumber, 1) ;获取id namen := name[idx] ;由id从数组读取值并赋值 ipn := ip[idx] gwn := gateway[idx] StringSplit, var, ipn, . ;用“.”分割ip if gwn = { prompt = 该适配器没有默认网关,请手动输入!例如%var1%.%var2%.%var3%.1 ;变量化提示 goto, setgwn } if gwn = %gww% { prompt = 你的内外网为同一个网络适配器,请手动输入内网的网关!`n例如%var1%.%var2%.%var3%.1 goto, setgwn } GuiControl, , nei, %namen% GuiControlGet, route ;获取路由编辑控件信息 StringSplit, nn, ipn, . ipnn = %nn1%.0.0.0 ;内网路由 GuiControl, , route, %route%`nroute add %ipnn% mask 255.0.0.0 %gwn% ;追加路由到窗口 Return setgwn: InputBox, gwn, 设置内网网关, %prompt%, , 600, 200 testgwn := RegExMatch(gwn, "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}") ;检查ip格式 if testgwn = 0 { prompt = 该适配器没有默认网关,请手动输入!例如%var1%.%var2%.%var3%.1 MsgBox, 64, 提示, 网关格式错误! goto, setgwn } if gwn = %gww% { prompt = 你的内外网为同一个网络适配器,请手动输入内网的网关!`n例如%var1%.%var2%.%var3%.1 MsgBox, 64, 提示, 网关与外网网关相同,请重新填写! goto, setgwn } GuiControl, , nei, %namen% GuiControlGet, route StringSplit, nn, ipn, . ipnn = %nn1%.0.0.0 GuiControl, , route, %route%`nroute add %ipnn% mask 255.0.0.0 %gwn% Return setwai: FocusedRowNumber := LV_GetNext(0, "F") if not FocusedRowNumber { MsgBox, 4144, 提示, 您未选中任何网卡! Return } LV_GetText(idx, FocusedRowNumber, 1) namew := name[idx] ipw := ip[idx] gww := gateway[idx] StringSplit, var, ipw, . if gww = { prompt = 该适配器没有默认网关,请手动输入!例如%var1%.%var2%.%var3%.1 goto, setgww } if gww = %gwn% { prompt = 你的内外网为同一个网络适配器,请手动输入外网的网关!`n例如%var1%.%var2%.%var3%.1 goto, setgww } GuiControl, , wai, %namew% GuiControlGet, route GuiControl, , route, %route%`nroute add 0.0.0.0 mask 0.0.0.0 %gww% Return setgww: InputBox, gww, 设置外网网关, %prompt%, , 600, 200 testgww := RegExMatch(gww, "\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}") if testgww = 0 { prompt = 该适配器没有默认网关,请手动输入!例如%var1%.%var2%.%var3%.1 MsgBox, 64, 提示, 网关格式错误! goto, setgwn } if gwn = %gww% { prompt = 你的内外网为同一个网络适配器,请手动输入外网的网关!`n例如%var1%.%var2%.%var3%.1 MsgBox, 64, 提示, 网关与内网网关相同,请重新填写! goto, setgww } GuiControl, , wai, %namew% GuiControlGet, route GuiControl, , route, %route%`nroute add 0.0.0.0 mask 0.0.0.0 %gww% Return GuiClose: ExitApp exec: RunWait, 内外网双用路由.cmd, ,Hide ExitApp submit: GuiControlGet, route if gww = { MsgBox, 64, 提示, 没有设置外网信息! Return } if gwn = { MsgBox, 64, 提示, 没有设置内网信息! Return } FileDelete, 内外网双用路由.cmd FileAppend, %route%, 内外网双用路由.cmd MsgBox, 64, 提示, 已经保存并生成“内外网双用路由.cmd” if exec = 1 RunWait, 内外网双用路由.cmd, ,Hide exec = 0 Return sexec: exec = 1 goto, exec Return help: MsgBox, 64, 帮助, 程序会帮你生成内外网双用的批处理,并在下次打开软件的时候提示你是否按设置好的信息执行。`n网关就相当于出口,内网和外网的出口是不一样的,有宽带连接的需要设置宽带连接的网关为外网网关。`n你也可以添加自定义路由在路由设置里面。 Return
49 queries in 2.543 seconds |