推荐一款 在线UML制作工具processOn

推荐一款 在线UML制作工具processOn

由于默认可以使用的私有文件数量太少了,另外附赠批量要求,只需要有2个邮箱即可,如现在使用email1注册的帐号,现在邀请email2注册,只需修改源码中的被邀请邮箱、用户名开头、email1帐号的要求连接即可,然后运行main,最后进入邮箱email2然后挨个的点击验证就可以了

Processon.java

import HttpQuery;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

/**
 * Created with IntelliJ IDEA.
 * User: Karl
 * Date: 2015/3/16
 * Time: 14:10
 * Description:
 */
public class Processon {
    private static Logger log = Logger.getLogger(Processon.class);

    public static String BeInvitedEmail = "[email protected]";//被邀请邮箱
    public static String PASSWORD = "123456";//默认注册密码
    public static String FULLNAME = "myname_";//默认用户名开头部分
    public static String vnviteURL = "https://www.processon.com/i/afa123211f9053502ddf";//我的邀请连接

    public static String signup = "https://www.processon.com/signup";
    public static String signupSubmit = "https://www.processon.com/signup/submit";

    public static void main(String[] args){
        try {
            Processon processon = new Processon();
            for(int i=1; i<100; i++) {
                processon.start(i);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }

    public void start(int num)  throws Exception{
        String html = httpQuery.get(vnviteURL, null);
        html = httpQuery.get(signup,null);
        String email = this.genSpace(num)+BeInvitedEmail;
        String pass = PASSWORD;
        String fullname= FULLNAME+num;
        Map map = new HashMap();
        map.put("email", email);
        map.put("pass", pass);
        map.put("fullname", fullname);
        html = httpQuery.post(signupSubmit, map);
        int index = html.indexOf("We have sent a verification email");
        if(index > 0) {
            System.out.println(num+": "+html.substring(index, index+190));
        }else{
            System.out.println(html);
        }
    }

    private String genSpace(int num){
        StringBuffer sb = new StringBuffer();
        for(int i=0; i


httpQuery 源码 详见上一篇文章


你可能感兴趣的:(httpclient)