代码分析

 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的注册代码的更多相关文章

  1. GIF Movie Gear逆向实战+注册代码+补丁

    GIF Movie Gear逆向实战+注册代码+补丁 准备 我是在windows 8.1 x64上进行的操作.有不足之处,还望大虾指出. 获取资源 网站下载:http://www.gamani.com ...

  2. java-JDBC登录注册代码

    登录: public static void main(String[] args) throws Exception{ Scanner sc = new Scanner(System.in); Sy ...

  3. php+Mysql页面注册代码

    页面设置代码:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF- ...

  4. 【C#】【MySQL】C#连接MySQL数据库(三)登陆注册代码

    项目结构 项目代码 WebForm_Login.aspx <%@ Page Language="C#" AutoEventWireup="true" Co ...

  5. Python简单的登录注册代码

    #-*- coding: utf-8 -*- import hashlib # 定义数据库(声明字典) #注册登录的简单hash处理 db={} def get_md5(password): md5= ...

  6. jQuery之方法绑定(事件注册)代码小结

    1.最直接的模式,直接将一个function对象传入方法函数,如下面的click(),好处坏处一看便知 $("#btnComfirmChooseCompany").click(fu ...

  7. 在myecplise中更新代码发布后没效果

    requestmapping指定路径不能访问: 重新发布,重新访问,清除缓存,重新访问,重启浏览器,清除缓存,重新访问,清除Tomcat相关目录,重新发布,重新访问……折腾了很久,可还是没有解决问题. ...

  8. MyEclipse注册代码

    package test;    import java.io.BufferedReader;  import java.io.IOException;  import java.io.InputSt ...

  9. .net 用户控件ascx.cs注册js脚本代码无效果

    在.net web项目中碰到一个比较奇怪的问题,网上没找到解决方案,先自己mark一下 问题描述: 添加一个用户控件ascx,在后端.cs添加js注册脚本,执行后没有弹出框 注册脚本为: this.P ...

随机推荐

  1. Java框架-mybatis03使用注解实现mybatis

    1.面向接口编程: 好处:扩展性好,分层开发中,上层不用管具体的实现,都遵循共同的标准,使得开发变得容易.规范性更好 2.注解的实现 a)编写Dao接口 public interface UserDa ...

  2. 使用Hive Rest API 连接HDInsight

    以下连接是微软最新的关于HDInsight中Hive命令的RestAPI示例地址.. 使用 HDInsight .NET SDK 运行 Hive 查询 请使用接口有异常的同学检查是否使用的是下面地址中 ...

  3. MongoDB数据库初探 --- 认识与安装 && Mongoose安装

    注意: monogdb数据在使用之后必须及时 mongodb.close()否则后台崩溃. 第一部分: MySQL数据库是关系型数据库,但是使用node开发时多用MongoDB数据库,两者各有优势,所 ...

  4. Git学习系列之Git产生的背景

    不多说,直接上干货! 史上最浅显易懂的Git教程! 为什么要编写这个教程?因为我在学习Git的过程中,买过书,也在网上Google了一堆Git相关的文章和教程,但令人失望的是,这些教程不是难得令人发指 ...

  5. Codeforces 156B Suspects——————【逻辑判断】

    Suspects Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit St ...

  6. 设置 mysql允许外网访问

    mysql的root账户,我在连接时通常用的是localhost或127.0.0.1,公司的测试服务器上的mysql也是localhost所以我想访问无法访问,测试暂停. 解决方法如下: 1,修改表, ...

  7. apache配置apache server status,监控服务器访问情况

    在apache配置文件中添加开启代码, 1.如果你的Apache配置文件httpd.conf或者extra/httpd-info.conf中有LoadModule status_module modu ...

  8. php对图片加水印--将一张图片作为水印加到另一张图片

    代码如下: /**  * 图片加水印(适用于png/jpg/gif格式)  *  * @param $srcImg  原图片  * @param $waterImg 水印图片  * @param $s ...

  9. [android] socket在手机上的应用

    1.手机助手 1.1 USB链接 可以读取手机的PID和VID,确定唯一的设备,可以给手机安装对应的驱动等 socket在固定端口通信 1.2 WIFI链接 pc在电脑在整个网段发送UDP数据包,手机 ...

  10. [android] android通信协议

    1.数据区分 手机端:常量存储 服务器端:数据库建表存储 2.数据来源 android,ios,pc,wap 3.数据采集,数据挖掘 IMEI:设备编号 IMSI:SIM卡编号 4.数据加密 4.1R ...