<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.riguz.com/index.php?action=history&amp;feed=atom&amp;title=Db_Schema_key-gen</id>
	<title>Db Schema key-gen - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.riguz.com/index.php?action=history&amp;feed=atom&amp;title=Db_Schema_key-gen"/>
	<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=Db_Schema_key-gen&amp;action=history"/>
	<updated>2026-05-31T12:19:29Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.riguz.com/index.php?title=Db_Schema_key-gen&amp;diff=3826&amp;oldid=prev</id>
		<title>Riguz：​Riguz移动页面Blog:破解Db Schema序列号至Db Schema key-gen，不留重定向</title>
		<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=Db_Schema_key-gen&amp;diff=3826&amp;oldid=prev"/>
		<updated>2023-12-19T09:05:00Z</updated>

		<summary type="html">&lt;p&gt;Riguz移动页面&lt;a href=&quot;/index.php?title=Blog:%E7%A0%B4%E8%A7%A3Db_Schema%E5%BA%8F%E5%88%97%E5%8F%B7&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Blog:破解Db Schema序列号（页面不存在）&quot;&gt;Blog:破解Db Schema序列号&lt;/a&gt;至&lt;a href=&quot;/Db_Schema_key-gen&quot; title=&quot;Db Schema key-gen&quot;&gt;Db Schema key-gen&lt;/a&gt;，不留重定向&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2023年12月19日 (二) 09:05的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;zh-Hans-CN&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wiki_db:diff:1.41:old-2519:rev-3826 --&gt;
&lt;/table&gt;</summary>
		<author><name>Riguz</name></author>
	</entry>
	<entry>
		<id>https://wiki.riguz.com/index.php?title=Db_Schema_key-gen&amp;diff=2519&amp;oldid=prev</id>
		<title>imported&gt;Riguz：​我始终认为数据库设计在系统设计中是一个很重要的工作，然而一直没有比较好的ER建模工具。使用过MySQL Workbench和Power Designer两种工具，但都存在很多不喜欢的地方，直到遇到DbSchema后眼前一亮，这才是一个Nice的工具嘛。
很可惜对于我们这种屌丝来说，是不舍得花钱去购买一个license的，试用期15天到了怎么办呢？当时也没发现有可用的破解版，因为它是基于Java的，这对破解来说减小了难度，于是趁着辞职后在家没事的空档来研究了一下破解。其实也就上午花了一会时间就搞定了。记录下破解的过程。</title>
		<link rel="alternate" type="text/html" href="https://wiki.riguz.com/index.php?title=Db_Schema_key-gen&amp;diff=2519&amp;oldid=prev"/>
		<updated>2016-07-22T00:00:00Z</updated>

		<summary type="html">&lt;p&gt;我始终认为数据库设计在系统设计中是一个很重要的工作，然而一直没有比较好的ER建模工具。使用过MySQL Workbench和Power Designer两种工具，但都存在很多不喜欢的地方，直到遇到DbSchema后眼前一亮，这才是一个Nice的工具嘛。 很可惜对于我们这种屌丝来说，是不舍得花钱去购买一个license的，试用期15天到了怎么办呢？当时也没发现有可用的破解版，因为它是基于Java的，这对破解来说减小了难度，于是趁着辞职后在家没事的空档来研究了一下破解。其实也就上午花了一会时间就搞定了。记录下破解的过程。&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;我始终认为数据库设计在系统设计中是一个很重要的工作，然而一直没有比较好的ER建模工具。使用过MySQL Workbench和Power Designer两种工具，但都存在很多不喜欢的地方，直到遇到DbSchema后眼前一亮，这才是一个Nice的工具嘛。&lt;br /&gt;
很可惜对于我们这种屌丝来说，是不舍得花钱去购买一个license的，试用期15天到了怎么办呢？当时也没发现有可用的破解版，因为它是基于Java的，这对破解来说减小了难度，于是趁着辞职后在家没事的空档来研究了一下破解。其实也就上午花了一会时间就搞定了。记录下破解的过程。&lt;br /&gt;
首先是找到dbschema.jar，这是程序的主要jar包，其他是一些第三方的jar包和jdbc驱动等，于是它就是破解的关键。利用jd-gui反编译这个jar包，首先把源码都保存下来。&lt;br /&gt;
&lt;br /&gt;
顺藤摸瓜，首先打开dbschema的注册窗口，根据里面的关键字搜索，比如Registration，然后一个个去找，这时，发现一个对话框：&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;code class=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public class RegistrationDialog&lt;br /&gt;
...&lt;br /&gt;
JButton localJButton1 = new JButton(getAction(&amp;quot;register&amp;quot;));&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
这不就是注册的按钮么？然后就看它的action:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/*     */   public void register() {&lt;br /&gt;
/*  96 */     String str1 = this.b.getText();&lt;br /&gt;
/*     */     &lt;br /&gt;
/*  98 */     if ((str1 == null) || (str1.length() == 0)) {&lt;br /&gt;
/*  99 */       JOptionPane.showMessageDialog(this, d.a(11), &amp;quot;Error&amp;quot;, 0);&lt;br /&gt;
/* 100 */       return;&lt;br /&gt;
/*     */     }&lt;br /&gt;
/* 102 */     String str2 = this.c.getText();&lt;br /&gt;
/* 103 */     if (str2 == null) {&lt;br /&gt;
/* 104 */       JOptionPane.showMessageDialog(this, d.a(19), &amp;quot;Error&amp;quot;, 0);&lt;br /&gt;
/* 105 */       return;&lt;br /&gt;
/*     */     }&lt;br /&gt;
/* 107 */     str1 = str1.trim();&lt;br /&gt;
/* 108 */     str2 = str2.trim();&lt;br /&gt;
/* 109 */     e.b(d.a(31), str1);&lt;br /&gt;
/* 110 */     e.b(d.a(21), str2);&lt;br /&gt;
/*     */     &lt;br /&gt;
/* 112 */     int i = g.b();&lt;br /&gt;
/* 113 */     if (i == Integer.MAX_VALUE) {&lt;br /&gt;
/* 114 */       dispose();&lt;br /&gt;
/* 115 */       JOptionPane.showMessageDialog(this.a.c(), d.a(23), &amp;quot;Info&amp;quot;, 1, null);&lt;br /&gt;
/* 116 */       this.a.c().c();&lt;br /&gt;
/* 117 */     } else if ((i &amp;gt; 0) &amp;amp;&amp;amp; (str1.toLowerCase().startsWith(&amp;quot;extend&amp;quot;))) {&lt;br /&gt;
/* 118 */       dispose();&lt;br /&gt;
/* 119 */       JOptionPane.showMessageDialog(this.a.c(), d.a(24).replaceAll(&amp;quot;\\{days\\}&amp;quot;, &amp;quot;&amp;quot; + i), &amp;quot;Info&amp;quot;, 1, null);&lt;br /&gt;
/* 120 */     } else if (i == -2) {&lt;br /&gt;
/* 121 */       String str3 = d.a(77).replace(&amp;quot;{0}&amp;quot;, new SimpleDateFormat(&amp;quot;dd.MMMMM.yyyy&amp;quot;).format(new Date(g.c())));&lt;br /&gt;
/* 122 */       JOptionPane.showMessageDialog(this.a.c(), str3, &amp;quot;Error&amp;quot;, 0);&lt;br /&gt;
/*     */     } else {&lt;br /&gt;
/* 124 */       JOptionPane.showMessageDialog(this.a.c(), d.a(8), &amp;quot;Error&amp;quot;, 0);&lt;br /&gt;
/*     */     }&lt;br /&gt;
/*     */   }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
112行开始有点意思，其实大概能猜到是干什么，反正是算剩余天数的，那么这个int i = g.b();就是最核心的东西了：&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public static int b()&lt;br /&gt;
  {&lt;br /&gt;
    String str1 = e.d(d.a(31), null);&lt;br /&gt;
    String str2 = e.d(d.a(21), null);&lt;br /&gt;
    int m = -1;&lt;br /&gt;
    if ((str1 != null) &amp;amp;&amp;amp; (str2 != null) &amp;amp;&amp;amp; (str2.length() &amp;gt; 3))&lt;br /&gt;
    {&lt;br /&gt;
      if ((str1.toLowerCase().startsWith(&amp;quot;extend&amp;quot;)) &amp;amp;&amp;amp; (c(str1, str2)))&lt;br /&gt;
      {&lt;br /&gt;
        m = Math.max(15 - f(&amp;quot;mmax&amp;quot;), -1);&lt;br /&gt;
      }&lt;br /&gt;
      else if (str2.length() &amp;gt; 15)&lt;br /&gt;
      {&lt;br /&gt;
        String str3 = str2.substring(4, 9);&lt;br /&gt;
        String str4 = str2.substring(0, 4) + str2.substring(9);&lt;br /&gt;
        if (c(&amp;quot;ax5&amp;quot; + str1 + &amp;quot;b52w&amp;quot; + str3 + &amp;quot;vb3&amp;quot;, str4))&lt;br /&gt;
        {&lt;br /&gt;
          try&lt;br /&gt;
          {&lt;br /&gt;
            k = Integer.parseInt(str3) * 86400000L + 1356994800000L;&lt;br /&gt;
          }&lt;br /&gt;
          catch (NumberFormatException localNumberFormatException)&lt;br /&gt;
          {&lt;br /&gt;
            c.b(localNumberFormatException);&lt;br /&gt;
          }&lt;br /&gt;
          m = Integer.MAX_VALUE;&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      m = Math.max(15 - f(&amp;quot;mma&amp;quot;), -1);&lt;br /&gt;
    }&lt;br /&gt;
    return m;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
看到这，我们其实已经拿到了计算key的方法，只不过这是一个验证的函数，如果我们要计算出key，需要反向推倒出来，这里就不具体解释了，最终反向出来的代码其实很简单，我做了一个C++版本的：&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
inline const string generateKey(string name)&lt;br /&gt;
{&lt;br /&gt;
    string salt = getSalt();&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;salt:&amp;quot; &amp;lt;&amp;lt; salt &amp;lt;&amp;lt; endl;&lt;br /&gt;
    string encryptSource = &amp;quot;ax5&amp;quot; + name + &amp;quot;b52w&amp;quot; + salt + &amp;quot;vb3&amp;quot;;&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;encrypt:&amp;quot; &amp;lt;&amp;lt; encryptSource &amp;lt;&amp;lt; endl;&lt;br /&gt;
    string hash = MD5(encryptSource).toStr();&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;md5:&amp;quot; &amp;lt;&amp;lt; hash &amp;lt;&amp;lt; endl;&lt;br /&gt;
    return hash.substr(0, 4) + salt + hash.substr(4);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
于是我们就有了一个key生成器了，完整的key生成器源码在Github。&lt;/div&gt;</summary>
		<author><name>imported&gt;Riguz</name></author>
	</entry>
</feed>