public static String[] getRandCode() throws IOException {
        //验证码
        URL url = new URL("https://kyfw.12306.cn/otn/passcodeNew/getPassCodeNew.do?module=login&rand=sjrand&"
                + new Date().getTime());
        HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
        con.setSSLSocketFactory(Utils.getSsf());
        InputStream is = con.getInputStream();
        byte[] buf = new byte[1024];
        int len = 0;
        int count = 0;
        byte[] total = new byte[] {};
        try {
            while ((len = is.read(buf)) != -1) {
                count = total.length + len;
                byte[] tmp = new byte[count];
                System.arraycopy(total, 0, tmp, 0, total.length);
                System.arraycopy(buf, 0, tmp, total.length, len);
                total = tmp;
            }
        } finally {
            is.close();
        }
        BASE64Encoder be = new BASE64Encoder();
        String dataURI = "data:image/png;base64," + be.encode(total);
        String[] res = { dataURI, Utils.getSessionId(con) };
        return res;
    }