MyEcplise的注册代码
代码分析
package test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class FTL
{ 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 FTL()
{ 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(); FTL myeclipsegen = new FTL(); String res = myeclipsegen.getSerial(userId, "5"); System.out.println("Serial:" + res); reader.readLine(); } catch (IOException ex)
{ } } }
代码截图

MyEcplise的注册代码的更多相关文章
- GIF Movie Gear逆向实战+注册代码+补丁
GIF Movie Gear逆向实战+注册代码+补丁 准备 我是在windows 8.1 x64上进行的操作.有不足之处,还望大虾指出. 获取资源 网站下载:http://www.gamani.com ...
- java-JDBC登录注册代码
登录: public static void main(String[] args) throws Exception{ Scanner sc = new Scanner(System.in); Sy ...
- php+Mysql页面注册代码
页面设置代码:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF- ...
- 【C#】【MySQL】C#连接MySQL数据库(三)登陆注册代码
项目结构 项目代码 WebForm_Login.aspx <%@ Page Language="C#" AutoEventWireup="true" Co ...
- Python简单的登录注册代码
#-*- coding: utf-8 -*- import hashlib # 定义数据库(声明字典) #注册登录的简单hash处理 db={} def get_md5(password): md5= ...
- jQuery之方法绑定(事件注册)代码小结
1.最直接的模式,直接将一个function对象传入方法函数,如下面的click(),好处坏处一看便知 $("#btnComfirmChooseCompany").click(fu ...
- 在myecplise中更新代码发布后没效果
requestmapping指定路径不能访问: 重新发布,重新访问,清除缓存,重新访问,重启浏览器,清除缓存,重新访问,清除Tomcat相关目录,重新发布,重新访问……折腾了很久,可还是没有解决问题. ...
- MyEclipse注册代码
package test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputSt ...
- .net 用户控件ascx.cs注册js脚本代码无效果
在.net web项目中碰到一个比较奇怪的问题,网上没找到解决方案,先自己mark一下 问题描述: 添加一个用户控件ascx,在后端.cs添加js注册脚本,执行后没有弹出框 注册脚本为: this.P ...
随机推荐
- django notes 一:开篇
公司 web 框架用的是 django, 以前没用过,打算这两周好好看看. 边学习边整理一下笔记,加深理解. 好像谁说过初学者更适合写入门级的教程,我觉得有一定道理. 高手写的教程有一定深度,不会写入 ...
- 怎么高效查找和正确改变谷歌浏览器编码格式(新版和旧版Google Chrome)(图文详解)
前言 今天,无意中在解决一个乱码问题,后台是有过判断解决兼容性问题,但是有个别电脑还是有乱码问题,就去想改变下前台的编码格式,突然发现一向好用的谷歌,居然找不到编码格式了! 上网百度了半天,查阅各种网 ...
- Java下的i++问题
在解决一道面试题目时遇到问题. public class Inc { public static void main(String args[]){ Inc inc = new Inc(); int ...
- Hosts文件说明
Hosts是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的IP地址建立一个关联“数据库”,当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从Host ...
- php mktime()函数
PHP提供一个很好用的函数mktime().你只要按顺序传送给mktime()你希望表示的小时,分钟,秒数,月份,日期,及年份,mktime()就会返回该日期自1970年1月1日的总秒数.获取2000 ...
- java 并发(五)---AbstractQueuedSynchronizer(3)
文章代码分析和部分图片来自参考文章 问题 : CountDownLatch 和 CyclicBarrier 的区别 认识 CountDownLatch 分析这个类,首先了解一下它所可以 ...
- 从代理模式到Spring AOP
什么是代理模式 假如我喜欢上隔壁班的翠花,但是我没胆量向她送花,这时候我需要一个铁杆哥们帮我做这件事, 很明显这哥们是个代理,是去执行任务的,但是花实际上是我"送"的,代理和我一样 ...
- IE11 F12 开发人员工具 查看 Cookie
参考网址:Using the F12 developer tools in IE11 Step1 : IE11 => F12 打开 开发人员工具 Step2:开发人员工具 => 网络F5 ...
- 《MySQL 基础课程》笔记整理(基础篇)
一.尝试MySQL 1.打开MySQL # 启动MySQL服务 sudo service mysql start # 使用 root 用户登录,这里密码为空,直接回车登录 mysql -u root ...
- SQL语句整理(二) 数据定义语言DDL
前言: 这是我学数据库时整理的学习资料,基本上包括了所以的SQL语句的知识点. 我的教材是人大王珊老师的<数据库系统概论>. 因为是手打的,所以会用一些细节打错了,但都挺明显也不多(考完试 ...