public void pushCookie() throws IOException, JSONException, IllegalBlockSizeException, IllegalBlockSizeException, IllegalBlockSizeException, BadPaddingException, BadPaddingException, BadPaddingException, NoSuchAlgorithmException, NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, NoSuchPaddingException, NoSuchPaddingException, InterruptedException {
        while (true) {
            DB db = Mongo.connect(new DBAddress(conf.getCookieHost(), conf.getCookieDBName()));
            db.requestStart();
            DBCollection coll = db.getCollection(conf.getCookieCollectionName());
            DBCollection uidColl = db.getCollection(conf.getCookie_idCollectionName());
            DBCursor cur = uidColl.find(new BasicDBObject("status", "available"));
            ArrayList<DBObject> loginList=new ArrayList<DBObject>();
            while (cur.hasNext()) {
                Thread.sleep((long) (1000 * 10 * Math.random()));
                DBObject obj = cur.next();
                String cookie = getLoginCookie(obj.get("uid").toString(), obj.get("pwd").toString());
                Thread.sleep(1000 * 10);
                if (!cookie.isEmpty() && cookie != null && !cookie.equals("")) {
                    Date date = new Date();
                    DBObject inObj = new BasicDBObject();
                    inObj.put("cookie", cookie);
                    inObj.put("date", date.toString());
                    inObj.put("status", "available");
                    loginList.add(inObj);
                } else {
                    continue;
                }
            }
            if (loginList.size() > 0) {
                DBObject queryObj = new BasicDBObject("status", "available");
                DBObject updateObj = new BasicDBObject("$set", new BasicDBObject("status", "disable"));
                coll.update(queryObj, updateObj, false, true);
                for (DBObject o : loginList) {
                    coll.insert(o);
                }
                cur.close();
                db.requestDone();
                db.getMongo().close();
                System.out.println(Class.class.getName()+"\tstart sleeping...");
                Thread.sleep(1000 * 60 * 60 * 12);
            } else {
                cur.close();
                db.requestDone();
                db.getMongo().close();
                System.out.println(this.getClass().getName()+"\tcatch exception:run again after 1 min");
                Thread.sleep((long)(1000 * 60 * Math.random()));
            }
        }
    }