<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    饒榮慶 -- 您今天UCWEB了嗎?--http://www.ucweb.com

    3G 手機開發網

       :: 首頁 :: 聯系 :: 聚合  :: 管理
      99 Posts :: 1 Stories :: 219 Comments :: 0 Trackbacks

     

    1.關于自動注冊原理與實踐。

    1.基于瀏覽器請求,-- 程序員寫出一個程序模擬一條自動注冊url,把注冊所必須的參數都附在請求后面
    2.基于HttpClient 請求。實現過程比較簡單,可以通過穿過ssl進行請求

    自動注冊首先要解決的問題:
    1.關于注冊驗證嗎的破解。
      1.市面上一個簡單圖片驗證嗎的開發已經不是什么難事了,對于程序生產的圖片,破解起來是比較困難的,
        特別是google,我曾經不段的驗證,發現,如果您單獨取出那條驗證嗎的,話,google會說您的請求錯誤,
        也就是google的驗證嗎的前提是必須輸入請求注冊url才行,因此破解它是很困難的。
      2.關于中文驗證嗎,雖然生產原理是一樣,但是給注冊的人破解就跟是難了。

    由于以上原因,我沒有找到一個關于破解驗證嗎的程序,而我本人知識水平有限,因此自動注冊,我只能
    找出那些字段跟注冊url,并模擬一個注冊請求。

    前陣子,因為有需求,打算破解Gmail的圖片識別碼,進而達到自動注冊Gmail郵箱的構想,

    想法大概如下,構建一個Model,保存注冊Gmail郵箱必填字段,跟一些隱藏參數,

    先向Gmail注冊地址進行請求服務,拿下Gmail圖片驗證碼,進而調用圖片識別程序,進行循環破解,知道破解成功,然后往Model設置識別嗎的參數,

    最后調用HttpClient進行請求服務。最后分析返回htm結果進行分析,是否注冊成功。

    在這里,唯一的難度就是破解驗證嗎程序,小弟還沒找到好方法,不過至于模擬其他請求已經設置好。現在發個代碼給大家看看

     

    /** *//********************************************************************
     * 項目名稱                :<b>j2me學習</b>            <br/>
     * 
     * Copyright 2005-2006 Wuhua. All rights reserved
     ********************************************************************/
    package org.job.four;

    /** *//**
     * <b>類名:Member.java</b> </br> 
     * 編寫日期: 2007-3-27 <br/>
     * 程序功能描述:提供對注冊字段的封裝,<br/>
     *  程序只需要封裝一個member,再向gmail發生請求<br/>
     * Demo: <br/>
     * Bug: <br/>
     * 
     * 程序變更日期 :<br/> 
     * 變更作者 :<br/> 
     * 變更說明 :<br/>
     * 
     * @author wuhua </br> <a href="mailto:rrq12345@163.com">rrq12345@163.com</a>
     */
    public class Member ...{
        
        private String PasswdAgain = "51jobboj"; //重復密碼
     
        private String FirstName="foxjob"; //名字
        private String LastName="tang";//姓
        private String Email="gooooooooooooooooooooooooooogle";//email名字
        private String Passwd="51jobboj";//密碼
        private String selection="who is me?";//安全問題
        
        private String IdentityAnswer="me to 51job"; //密碼安全問題答案
        private String SecondaryEmail="gooogledev@gmail.com";//第2電子郵箱
        private String loc="中國"; //地點
        private String newaccountcaptcha="";  //驗證嗎
        
        
        //以下是gmail隱藏的參數
        private String Continue = "http://mail.google.com/mail/e-11-104e59efab9ad9107b5532645c608844-f30129a93b86f8b2ec791bab26d3a93974381ba7"; //由于continue是java關鍵字,所以把c改為大寫C
        private String t="6e91f0ba-47e895da-33e242a784269c0e1776";
        private String service="mail";
        private String dsh = "7874657562226198951";
        public final String getContinue() ...{
            return Continue;
        }
        public final String getDsh() ...{
            return dsh;
        }
        public final String getService() ...{
            return service;
        }
        public final String getT() ...{
            return t;
        }
        public final void setContinue(String continue1) ...{
            Continue = continue1;
        }
        public final void setDsh(String dsh) ...{
            this.dsh = dsh;
        }
        public final void setService(String service) ...{
            this.service = service;
        }
        public final void setT(String t) ...{
            this.t = t;
        }
        public final String getEmail() ...{
            return Email;
        }
        public final String getFirstName() ...{
            return FirstName;
        }
        public final String getIdentityAnswer() ...{
            return IdentityAnswer;
        }
        public final String getLastName() ...{
            return LastName;
        }
        public final String getLoc() ...{
            return loc;
        }
        public final String getNewaccountcaptcha() ...{
            return newaccountcaptcha;
        }
        public final String getPasswd() ...{
            return Passwd;
        }
        public final String getPasswdAgain() ...{
            return PasswdAgain;
        }
        public final String getSecondaryEmail() ...{
            return SecondaryEmail;
        }
        public final String getSelection() ...{
            return selection;
        }
        public final void setEmail(String email) ...{
            Email = email;
        }
        public final void setFirstName(String firstName) ...{
            FirstName = firstName;
        }
        public final void setIdentityAnswer(String identityAnswer) ...{
            IdentityAnswer = identityAnswer;
        }
        public final void setLastName(String lastName) ...{
            LastName = lastName;
        }
        public final void setLoc(String loc) ...{
            this.loc = loc;
        }
        public final void setNewaccountcaptcha(String newaccountcaptcha) ...{
            this.newaccountcaptcha = newaccountcaptcha;
        }
        public final void setPasswd(String passwd) ...{
            Passwd = passwd;
        }
        public final void setPasswdAgain(String passwdAgain) ...{
            PasswdAgain = passwdAgain;
        }
        public final void setSecondaryEmail(String secondaryEmail) ...{
            SecondaryEmail = secondaryEmail;
        }
        public final void setSelection(String selection) ...{
            this.selection = selection;
        }
      
        
        public static final Member getDefaultMember()...{
            
            return new Member();
        }
    }

     

     

    package org.job.four;

    import java.io.IOException;

    import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.HttpException;
    import org.apache.commons.httpclient.HttpStatus;
    import org.apache.commons.httpclient.NameValuePair;
    import org.apache.commons.httpclient.methods.GetMethod;
    import org.apache.commons.httpclient.methods.PostMethod;
    import org.apache.commons.httpclient.params.HttpMethodParams;
    import org.job.util.Logger;

    /** *//**
     * <b>類名:AutoRegistGmail.java</b> </br> 
     * 編寫日期: 2007-3-27 <br/>
     * 程序功能描述:對Gami自動注冊的啟動類 <br/>
     * 注冊原理實現是,封裝一些gmail比填的字段,然后再通過HttpClient向Gmail請求,
     * 請求完畢后分析結果
     * Demo: <br/>
     * Bug: <br/>
     * 
     * 程序變更日期 :<br/> 
     * 變更作者 :<br/> 
     * 變更說明 :<br/>
     * 
     * @author wuhua </br> <a href="mailto:rrq12345@163.com">rrq12345@163.com</a>
     */
    public class AutoRegistGmail ...{

     

        private static String postRegistUrl = "https://www.google.com/accounts/NewAccount";

        private static Logger logger = Logger.getLogger(AutoRegistGmail.class);

        public static void main(String[] args) ...{
            autoRegist();
        }

        public final static void autoRegist() ...{
            logger.debug("開始自動注冊Gmail.....");
        
            //        構造HttpClient的實例
            HttpClient httpClient = new HttpClient();
            PostMethod postMethod = new PostMethod(postRegistUrl);
            Member member = Member.getDefaultMember();
            
            //             填入各個表單域的值
            NameValuePair[] data = ...{
                    new NameValuePair("Email", member.getEmail()),
                    new NameValuePair("Passwd", member.getPasswd()),
                    new NameValuePair("PasswdAgain", member.getPasswdAgain()),
                    new NameValuePair("FirstName", member.getFirstName()),
                    new NameValuePair("Loc", member.getLoc()),
                    new NameValuePair("newaccountcaptcha", member
                            .getIdentityAnswer()),
                    new NameValuePair("IdentityAnswer", member
                            .getNewaccountcaptcha()),
                    new NameValuePair("Selection", member.getSelection()),
                    new NameValuePair("SecondaryEmail", member.getSecondaryEmail()),
                    new NameValuePair("continue", member.getContinue()),
                    new NameValuePair("dsh", member.getDsh()),
                    new NameValuePair("service", member.getService()) };

            //             將表單的值放入postMethod中
            postMethod.setRequestBody(data);
            try ...{
                //執行getMethod
                int statusCode = httpClient.executeMethod(postMethod);
                if (statusCode != HttpStatus.SC_OK) ...{
                    System.err.println("Method failed: "
                            + postMethod.getStatusLine());
                }
                //讀取內容 
                byte[] responseBody = postMethod.getResponseBody();
                //處理內容
                System.out.println(new String(responseBody, "UTF-8"));
            } catch (HttpException e) ...{
                //發生致命的異常,可能是協議不對或者返回的內容有問題
                System.out.println("Please check your provided http address!");
                e.printStackTrace();
            } catch (IOException e) ...{
                //發生網絡異常
                e.printStackTrace();
            } finally ...{
                //釋放連接
                postMethod.releaseConnection();
            }

        }
    }



    爬蟲工作室 -- 專業的手機軟件開發工作室
    3G視線 -- 專注手機軟件開發
    posted on 2007-04-04 12:42 3G工作室 閱讀(2881) 評論(8)  編輯  收藏 所屬分類: j2ee

    Feedback

    # re: 自動注冊gmail郵箱構想 2007-04-04 13:58 aaa
    寫了等于白寫吧,核心的問題沒解決。把那些 getter 與 setter、變量的定義去掉,沒幾行代碼了。  回復  更多評論
      

    # re: 自動注冊gmail郵箱構想[未登錄] 2007-04-04 14:08 samuel
    就是!說的沒錯  回復  更多評論
      

    # re: 自動注冊gmail郵箱構想 2007-04-04 14:21 yuri
    解決驗證碼,其他的都不是問題  回復  更多評論
      

    # re: 自動注冊gmail郵箱構想 2007-04-04 14:53 爬蟲工作室
    哈哈。我覺得我是沒這本事了,各位大哥有辦法,
    教教我行嗎?  回復  更多評論
      

    # re: 自動注冊gmail郵箱構想 2007-04-04 18:17 liulc
    構想倒是不錯  回復  更多評論
      

    # re: 自動注冊gmail郵箱構想 2007-04-05 08:53 aaa
    來破解blogjava的驗證碼吧,是保存在cookie里面的  回復  更多評論
      

    # re: 自動注冊gmail郵箱構想 2008-07-18 10:08 ubunto
    雖然沒提到解決驗證碼,不過對 httpclient 的 post和get 方法的使用流程有了更好的理解  回復  更多評論
      

    # re: 自動注冊gmail郵箱構想 2012-09-25 17:17 姜英祺
    請問樓主,自動注冊時有一個bgresponse字段您是怎么獲取到的?  回復  更多評論
      

    主站蜘蛛池模板: 巨胸狂喷奶水视频www网站免费| 国产在线a免费观看| 无套内射无矿码免费看黄| 特a级免费高清黄色片| 午夜免费福利在线观看| 亚洲av无码片在线观看| 亚洲av永久综合在线观看尤物| a在线视频免费观看| 精品国产亚洲一区二区三区| 国产日韩久久免费影院| 亚洲国产精品无码一线岛国| 日批视频网址免费观看| 日韩精品视频免费在线观看| 亚洲一本到无码av中文字幕| 思思99re66在线精品免费观看| 亚洲欧美成aⅴ人在线观看| a毛片在线看片免费| 亚洲处破女AV日韩精品| 久久精品中文字幕免费| 中文字幕亚洲精品资源网| 猫咪www免费人成网站| 精品亚洲视频在线观看| 视频免费在线观看| 91天堂素人精品系列全集亚洲| 1000部免费啪啪十八未年禁止观看| 亚洲无线一二三四区| 成人免费在线观看网站| 免费人成网上在线观看| 亚洲AV无码乱码国产麻豆| 午夜亚洲国产精品福利| 九九九精品成人免费视频| 男人的天堂av亚洲一区2区| 伊人久久大香线蕉亚洲| 亚洲免费在线视频播放| 亚洲av成人片在线观看| 亚洲精品成人片在线播放 | 亚洲人成电影网站免费| 精品特级一级毛片免费观看| 亚洲香蕉成人AV网站在线观看| 国产精品亚洲а∨天堂2021| 亚洲一区精品无码|