public boolean login() throws ClientProtocolException, IOException {
		getRandCode();
		getCode();
		for (int i = 0; i < StaticData.chs.length; i++) {
			for (int j = 0; j < StaticData.chs.length; j++) {
				code = "" + StaticData.chs[i] + StaticData.chs[j];
				// System.out.println(code);
				HttpPost httpost = new HttpPost(StaticData.loginUrl);
				List<NameValuePair> nvps = new ArrayList<NameValuePair>();
				nvps.add(new BasicNameValuePair("username", userName));
				nvps.add(new BasicNameValuePair("password", password));
				nvps.add(new BasicNameValuePair("code", code));
				nvps.add(new BasicNameValuePair("dosubmit", ""));
				nvps.add(new BasicNameValuePair("searchmem", "输入身份证号查询考试信息"));
				nvps.add(new BasicNameValuePair("randcode", randCode));
				httpost.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8"));
				ResponseHandler<String> handler = new BasicResponseHandler();
				String body = client.execute(httpost, handler);
				httpost.abort();
				if (body.indexOf("登陆成功") >= 0 && valitate()) {
					login = true;
					System.out.println("登录成功，开始刷车");
					return true;
				} else {
					// System.out.println(getTips(body));
				}
			}
		}
		return false;
	}