MyEclipse6.5&7.5&8.0 注册码的java源码

package com.souvc;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class MyeclipseGenKey {
    private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself.";

    public String getSerial(String userId, String licenseNum) {
        java.util.Calendar cal = java.util.Calendar.getInstance();
        cal.add(1, 3);
        cal.add(6, -1);
        java.text.NumberFormat nf = new java.text.DecimalFormat("000");
        licenseNum = nf.format(Integer.valueOf(licenseNum));
        String verTime = new StringBuilder("-").append(
                new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime()))
                .append("0").toString();
        String type = "YE3MP-";
        String need = new StringBuilder(userId.substring(0, 1)).append(type)
                .append("300").append(licenseNum).append(verTime).toString();
        String dx = new StringBuilder(need).append(LL).append(userId)
                .toString();
        int suf = this.decode(dx);
        String code = new StringBuilder(need).append(String.valueOf(suf))
                .toString();
        return this.change(code);
    }

    private int decode(String s) {
        int i;
        char[] ac;
        int j;
        int k;
        i = 0;
        ac = s.toCharArray();
        j = 0;
        k = ac.length;
        while (j < k) {
            i = (31 * i) + ac[j];
            j++;
        }
        return Math.abs(i);
    }

    private String change(String s) {
        byte[] abyte0;
        char[] ac;
        int i;
        int k;
        int j;
        abyte0 = s.getBytes();
        ac = new char[s.length()];
        i = 0;
        k = abyte0.length;
        while (i < k) {
            j = abyte0[i];
            if ((j >= 48) && (j <= 57)) {
                j = (((j - 48) + 5) % 10) + 48;
            } else if ((j >= 65) && (j <= 90)) {
                j = (((j - 65) + 13) % 26) + 65;
            } else if ((j >= 97) && (j <= 122)) {
                j = (((j - 97) + 13) % 26) + 97;
            }
            ac[i] = (char) j;
            i++;
        }
        return String.valueOf(ac);
    }

    public MyeclipseGenKey() {
        super();
    }

    public static void main(String[] args) {
        try {
            System.out.println("please input register name:");
            BufferedReader reader = new BufferedReader(new InputStreamReader(
                    System.in));
            String userId = null;
            userId = reader.readLine();
            MyeclipseGenKey myeclipsegen = new MyeclipseGenKey();
            String res = myeclipsegen.getSerial(userId, "5");
            System.out.println("Serial:" + res);
            reader.readLine();
        } catch (IOException ex) {
        }
    }
}
时间: 2024-08-28 15:54:23

MyEclipse6.5&7.5&8.0 注册码的java源码的相关文章

生成MyEclipse6.5&amp;7.5&amp;8.0注册码的java源码

//运行后即可得到注册码 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class MyEclipseKeyGen { private static final String LL = "Decompiling this copyrighted software is a violation of both your license agree

RxJava1.0 flatMap方法的源码分析

RxJava1.0 flatMap方法的源码分析 package com.yue.test; import java.awt.Cursor; import java.util.ArrayList; import java.util.List; import com.yue.bean.Course; import com.yue.bean.Student; import rx.Observable; import rx.Subscription; import rx.Observable.OnSu

Retrofit2.0使用PC蛋蛋源码搭建姊妹篇——带进度下载文件

Retrofit是PC蛋蛋源码搭建 dsluntan.com 目前最主流的网络框架了,它对网络请求几近完美的封装,大大降低了我们开发者的研发难度,缩短了研发周期.最近项目中遇到了下载视频和图片文件的需求(还有上传视频和图片的需求,请移步这篇博客),我第一反应是用retrofit做呀,so easy!产品接着说,要带下载进度条哦!我一想,retrofit好像并没有给我们提供显示下载进度的接口,哎呀,看来还是得自己个儿整整喽!接下来,我把自己实现Retrofit带进度下载文件的流程分享给大家.在de

centos 7 下 rabbitmq 3.8.0 &amp; erlang 22.1 源码编译安装

centos 7 下 rabbitmq 3.8.0 & erlang 22.1 源码编译安装 安装前请检查好erlang和rabbitmq版本是否相匹配参考:RabbitMQ Erlang Version Requirements 1. erlang 22.1 源码编译安装 1.1 安装Erlang编译安装必要依赖 sudo yum install -y gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-

Visual C++ 6.0/VC6.0经典插件之源码窗口管理(Visual Booster )插件 安装图解

Visual Booster 是Visual C++ 6.0开发环境的辅助工具,使用该工具打开.cpp..h或者其他资源文件时会在左边及下边显示打开的窗口(并以后缀归类),查看源码的时候相当有用. 1.下载 Visual Booster  Visual Booster 下载地址:http://pan.baidu.com/s/1o6BTbV8 密码:vikq 2.安装 Visual Booster  下载之后解压文件,运行文件夹内的 "Visual Booster.exe" 进行安装.如

EventBus3.0 组件通信框架源码学习总结

一.初始化 EventBus的初始化虽然用了单例模式,但是构造方法居然是public修饰符,可能是应对项目中的多线操作. //单例模式,针对并发情况进行了双层判断 public static EventBus getDefault() { if (defaultInstance == null) { synchronized (EventBus.class) { if (defaultInstance == null) { defaultInstance = new EventBus(); }

OPC2.0服务器开发包源码 opc服务器源代码 server 源程序DLL

1,vc++6.0软件完整工程 2,opc da2.0 服务器开发包,没有任何限制,例子提供1024个点的演示过程 3,opc核心封装成dll库,提供库源码 4,提供调用opc库的测试程序,演示如果用vc6调用dll的全部过程 5,opc服务器模拟数据项,让用户懂得如何开发自己的opc服务器 6,提供测试客户端,可学习和研究opc服务器的建立过程 7,完美的opc服务器开发包,适合开发自己的opc服务器,简单易用.

.NET Core 3.0 之初识Host源码

写在前面 ASP .NET Core中的通用主机构建器是在v2.1中引入的,应用在启动时构建主机,主机作为一个对象用于封装应用资源以及应用程序启动和生存期管理.其主要功能包括配置初始化(包括加载配置以及配置转换为通用的键值对格式),创建托管环境和Host通用上下文.依赖注入等. 在.NET Core 3.0中采用了IHostBuilder用于创建Host,同时也不再建议使用Web主机,而建议使用泛型主机,主要原因是原有的通用主机仅适用于非HTTP负载,为了提供更加广泛的主机方案,需要将HTTP管

冰蝎v2.0.1核心部分源码浅析

0x01 为什么要分析冰蝎 冰蝎是一种新型的木马连接工具,具备强大的功能,只要将冰蝎码上传到服务器并能够成功访问,那就可以执行诸多实用的功能,包括获取服务器基本信息,执行系统命令,文件管理,数据库管理,反弹meterpreter,执行自定义代码等,功能强大.而且和同类型的菜刀,蚁剑相比,加密了流量,只要在上传冰蝎码时和密匙协商建立连接的时候流量分析设备不能够检测出来,那么连接成功建立之后,waf,ids,ips就会好难再检测到出来.所以,冰蝎绝对是目前渗透测试,红蓝对抗中红方的一大利器.对于红方