<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 手機開發(fā)網(wǎng)

       :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
      99 Posts :: 1 Stories :: 219 Comments :: 0 Trackbacks

     

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

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

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

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

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

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

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

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

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

     

    /** *//********************************************************************
     * 項目名稱                :<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發(fā)生請求<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隱藏的參數(shù)
        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/>
     * 注冊原理實現(xiàn)是,封裝一些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 ...{
                //執(zhí)行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) ...{
                //發(fā)生致命的異常,可能是協(xié)議不對或者返回的內容有問題
                System.out.println("Please check your provided http address!");
                e.printStackTrace();
            } catch (IOException e) ...{
                //發(fā)生網(wǎng)絡異常
                e.printStackTrace();
            } finally ...{
                //釋放連接
                postMethod.releaseConnection();
            }

        }
    }



    爬蟲工作室 -- 專業(yè)的手機軟件開發(fā)工作室
    3G視線 -- 專注手機軟件開發(fā)
    posted on 2007-04-04 12:42 3G工作室 閱讀(2871) 評論(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字段您是怎么獲取到的?  回復  更多評論
      

    主站蜘蛛池模板: 无码视频免费一区二三区| 日韩免费精品视频| 亚洲va无码手机在线电影| 69式互添免费视频| 亚洲成a∨人片在无码2023| 亚洲精品国产综合久久一线| 中文字幕免费在线视频| 亚洲无线一二三四区| 国产乱色精品成人免费视频| 13小箩利洗澡无码视频网站免费| 亚洲国产中文在线二区三区免| 国产伦一区二区三区免费| 国产免费丝袜调教视频| 免费一区二区无码视频在线播放| 亚洲国产综合专区电影在线| 精品免费久久久久久成人影院| 99热在线日韩精品免费| 在线综合亚洲欧洲综合网站| 亚洲精品你懂的在线观看| 免费黄色网址网站| 国产精品免费AV片在线观看| 久久久久亚洲国产AV麻豆| 亚洲成在人天堂在线| 免费又黄又硬又爽大片| 0588影视手机免费看片| 99热免费在线观看| 一区二区三区免费高清视频| 亚洲av无码一区二区三区天堂古代| 亚洲欧洲中文日韩久久AV乱码| 日本一道综合久久aⅴ免费| 91精品全国免费观看含羞草| 免费在线观看一区| 污视频网站在线观看免费| 免费无遮挡无码视频在线观看| 美女被羞羞网站免费下载| 亚洲色大成网站www久久九 | 亚洲黄色免费网站| 久久亚洲欧洲国产综合| 日本一道一区二区免费看| 日韩高清免费在线观看| 免费国产a国产片高清|