安全测试 : 开课吧(kaikeba.com)网站短信接口安全测试,怎么做短信验证码防刷?
发布时间:2021-04-28 点击数:4254
安全问题不容忽视,不要亡羊补牢!
//配置请求头
inheads.put("Content-Type", "application/json");
inheads.put("Origin", "https://www.kaikeba.com");
inheads.put("Accept", "*/*");
inheads.put("Accept-Encoding", "gzip, deflate, br");
inheads.put("Accept-Language", "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7");
inheads.put("User-Agent",
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36");
inheads.put("Referer", "https://www.kaikeba.com/");
getCookie(cookieStore, httpclient, "https://www.kaikeba.com/", inheads, outheads);
String cookieStr = GetCookieHead.CookieHashToString(outheads);
if (cookieStr != null) {
inheads.put("Cookie", cookieStr);
}
//配置请求参数
JSONObject params = new JSONObject();
params.put("auth_ticket", "");
params.put("mobile", phone);
params.put("type", 1);
//配置请求
httpclient = createSSLClientDefault();
retEntity = this.userClick(httpclient, cookieStore, "post", smsUrl, inheads, outheads, input, phone);
closeHttpClient(httpclient);