一不小心用matlab做了个matlab注册机
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/iag0ZIDyLPHgxPiaxPm0qb7zlmaE5mM91JibKFqBQxUzia9FAkWFbSsYONm4ibria9NDL7HgPZiakZsWAZNhSSQFDykAg/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">想必<span style="color: black;">大众</span>对注册机这三个字并不陌生,不少软件采用<span style="color: black;">经过</span>绑定用户硬件信息的方式来进行软件授权,这其中就<span style="color: black;">触及</span>到<span style="color: black;">设备</span>码和注册码两个概念,前者是<span style="color: black;">按照</span>用户的计算机硬件信息结合加密算法生成的能够<span style="color: black;">独一</span>标识用户机的一串字符串,后者则是软件<span style="color: black;">研发</span>者或授权方基于用户<span style="color: black;">供给</span>的<span style="color: black;">设备</span>码给予软件授权的一串字符。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">为了<span style="color: black;">科研</span>学习注册机的工作原理,<span style="color: black;">博主</span>利用闲暇之余写了一款matlab版的注册机,它能够完美的嵌入到任何采用matlab编程的程序代码中。<span style="color: black;">大众</span>都<span style="color: black;">晓得</span>,pcode加密方式并不安全的,有<span style="color: black;">能手</span>能够轻<span style="color: black;">容易</span>松破解。行之有效的<span style="color: black;">办法</span><span style="color: black;">便是</span>将编程的matlab程序编译成可执行文件,如exe,<span style="color: black;">这般</span>就能够在<span style="color: black;">必定</span>程序上<span style="color: black;">守护</span>作者的原始代码。<span style="color: black;">倘若</span>想进一步<span style="color: black;">守护</span>自己的成果,<span style="color: black;">例如</span><span style="color: black;">研发</span>的程序的部分高级功能只想向特定的用户<span style="color: black;">研发</span>,<span style="color: black;">那样</span>这个时候就需要一种<span style="color: black;">方便</span>的方式来对用户进行识别,注册机模式<span style="color: black;">便是</span>一种行之有效的办法。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">1、</span>注册机客户端</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/iag0ZIDyLPHiaGyJM1XNHGnd0m167HwYD9WK08rJZcypPV13tr92otEN9wkTkAB3icAjUpPhKHlwjicGC9ibwWXaItg/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">首要</span>,需要<span style="color: black;">运用</span>matlab读取计算的硬件信息,常用的硬件信息<span style="color: black;">包含</span><span style="color: black;">CPU、BIOS、硬盘、主板、MAC<span style="color: black;">位置</span>等。对提取的硬件信息进行采用一定的加密算法进行加工处理成<span style="color: black;">所说</span>的<span style="color: black;">设备</span>码,如移位加密法、替换法等等。<span style="color: black;">设备</span>码是在用户端计算机上生成的,用于标识用户当前所<span style="color: black;">运用</span>的计算机。</span></p><span style="color: black;"><strong style="color: blue;"><span style="color: black;"> 注册机客户端界面源代码 </span></strong></span><span style="color: black;">%%Creat <span style="color: black;">interface</span></span><span style="color: black;">scr = get(groot,<span style="color: black;">ScreenSize</span>);</span><span style="color: black;">output = DecryptData(<span style="color: black;">1</span>);</span><span style="color: black;">pictkhd=figure(<span style="color: black;">position</span>,,<span style="color: black;">name</span>,<span style="color: black;">欢迎加入原创代码与<span style="color: black;">研究</span>论文Q群:921720886</span>,<span style="color: black;">NumberTitle</span>,<span style="color: black;">off</span>,<span style="color: black;">menubar</span>,<span style="color: black;">none</span>,<span style="color: black;">toolbar</span>,<span style="color: black;">none</span>,...</span><span style="color: black;"> <span style="color: black;">Resize</span>,<span style="color: black;">off</span>);</span><span style="color: black;">uicontrol(pictkhd,<span style="color: black;">style</span>,<span style="color: black;">text</span>,<span style="color: black;">position</span>,[<span style="color: black;">5</span> <span style="color: black;">150</span> <span style="color: black;">710</span> <span style="color: black;">40</span>],<span style="color: black;">string</span>,<span style="color: black;">m文件注册机(客户端)</span>,<span style="color: black;">FontSize</span>,<span style="color: black;">26</span>);</span><span style="color: black;">uicontrol(pictkhd,<span style="color: black;">style</span>,<span style="color: black;">text</span>,<span style="color: black;">position</span>,[<span style="color: black;">5</span> <span style="color: black;">103</span> <span style="color: black;">710</span> <span style="color: black;">40</span>],<span style="color: black;">string</span>,<span style="color: black;">源代码已上传至原创代码与<span style="color: black;">研究</span>论文Q群</span>,...</span><span style="color: black;"> <span style="color: black;">FontSize</span>,<span style="color: black;">15</span>,<span style="color: black;">FontWeight</span>,<span style="color: black;">bold</span>,<span style="color: black;">ForegroundColor</span>,<span style="color: black;">r</span>);</span><span style="color: black;">%% <span style="color: black;">设备</span>码</span><span style="color: black;">text1=uicontrol(pictkhd,<span style="color: black;">style</span>,<span style="color: black;">text</span>,<span style="color: black;">position</span>,[<span style="color: black;">20</span> <span style="color: black;">80</span> <span style="color: black;">150</span> <span style="color: black;">25</span>],<span style="color: black;">string</span>,<span style="color: black;"><span style="color: black;">设备</span>码:</span>,<span style="color: black;">FontSize</span>,<span style="color: black;">12</span>);</span><span style="color: black;">fileinput=uicontrol(pictkhd,<span style="color: black;">style</span>,<span style="color: black;">edit</span>,<span style="color: black;">position</span>,[<span style="color: black;">130</span> <span style="color: black;">80</span> <span style="color: black;">520</span> <span style="color: black;">30</span>],<span style="color: black;">string</span>,output,<span style="color: black;">FontSize</span>,<span style="color: black;">10</span>);</span><span style="color: black;">%% 一键复制</span><span style="color: black;">fzbutton = uicontrol(pictkhd,<span style="color: black;">Style</span>,<span style="color: black;">pushbutton</span>, <span style="color: black;">String</span>, <span style="color: black;">复制</span>,<span style="color: black;">Position</span>,[<span style="color: black;">655</span> <span style="color: black;">80</span> <span style="color: black;">40</span> <span style="color: black;">30</span>],<span style="color: black;">FontSize</span>,<span style="color: black;">10</span>,<span style="color: black;">Callback</span>,<span style="color: black;">clipboard("copy",output);</span>);</span><span style="color: black;">%% 注册码</span><span style="color: black;">text2=uicontrol(pictkhd,<span style="color: black;">style</span>,<span style="color: black;">text</span>,<span style="color: black;">position</span>,[<span style="color: black;">20</span> <span style="color: black;">40</span> <span style="color: black;">150</span> <span style="color: black;">25</span>],<span style="color: black;">string</span>,<span style="color: black;">注册码:</span>,<span style="color: black;">FontSize</span>,<span style="color: black;">12</span>);</span><span style="color: black;">fileoutput=uicontrol(pictkhd,<span style="color: black;">style</span>,<span style="color: black;">edit</span>,<span style="color: black;">position</span>,[<span style="color: black;">130</span> <span style="color: black;">40</span> <span style="color: black;">520</span> <span style="color: black;">30</span>],<span style="color: black;">string</span>,<span style="color: black;">,</span>FontSize<span style="color: black;">,10);</span></span><span style="color: black;"><span style="color: black;">ztbutton = uicontrol(pictkhd,</span>Style<span style="color: black;">,</span>pushbutton<span style="color: black;">, </span>String<span style="color: black;">, </span>粘贴<span style="color: black;">,</span>Position<span style="color: black;">,,</span>FontSize<span style="color: black;">,10,</span>Callback<span style="color: black;">,</span>ZCM = clipboard(<span style="color: black;">"paste"</span>);set(fileoutput,<span style="color: black;">"string"</span>,ZCM);<span style="color: black;">);</span></span><span style="color: black;">%% Dectyption</span><span style="color: black;"><span style="color: black;">dncrypt=uicontrol(pictkhd,</span>style<span style="color: black;">,</span>pushbutton<span style="color: black;">,</span>position<span style="color: black;">,,</span><span style="color: black;">string</span><span style="color: black;">,</span>注册<span style="color: black;">,</span>FontSize<span style="color: black;">,12,</span>CallBack<span style="color: black;">,</span>DecryptData(<span style="color: black;">1</span>,fileoutput);<span style="color: black;">);</span></span><span style="color: black;">%%EXIT</span><span style="color: black;"><span style="color: black;">exiting=uicontrol(pictkhd,</span>style<span style="color: black;">,</span>pushbutton<span style="color: black;">,</span>position<span style="color: black;">,,</span><span style="color: black;">string</span><span style="color: black;">,</span>退出<span style="color: black;">,</span>FontSize<span style="color: black;">,12,</span>CallBack<span style="color: black;">,</span><span style="color: black;">close</span>(pictkhd);<span style="color: black;">);</span></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">2、</span>注册机服务端</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/iag0ZIDyLPHiaGyJM1XNHGnd0m167HwYD9ocNvBCLVnvCa4I1znzSu1DXmLyER73Vu3bhbBCFFwfKWMibGbpDiaicEg/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">用户将软件生成的<span style="color: black;">设备</span>码发送给软件<span style="color: black;">研发</span>者或授权方,<span style="color: black;">得到</span><span style="color: black;">设备</span>码后,将<span style="color: black;">设备</span>码粘贴在服务端的<span style="color: black;">设备</span>码处,点击生成注册码<span style="color: black;">就可</span>生成注册码。<span style="color: black;">软件</span><span style="color: black;"><span style="color: black;">研发</span>者</span><span style="color: black;">或授权方</span>将注册码发给用户,用户<span style="color: black;">运用</span>注册码<span style="color: black;">就可</span>完成软件的授权认证。</p><strong style="color: blue;"><span style="color: black;"> 注册机客户端界面源代码 </span></strong><span style="color: black;">%%Creat <span style="color: black;">interface</span></span><span style="color: black;">scr = get(groot,<span style="color: black;">ScreenSize</span>);</span><span style="color: black;">pictzcj=figure(<span style="color: black;">position</span>,,<span style="color: black;">name</span>,<span style="color: black;">欢迎加入原创代码与<span style="color: black;">研究</span>论文Q群:921720886</span>,<span style="color: black;">NumberTitle</span>,<span style="color: black;">off</span>,<span style="color: black;">menubar</span>,<span style="color: black;">none</span>,<span style="color: black;">toolbar</span>,<span style="color: black;">none</span>,...</span><span style="color: black;"> <span style="color: black;">Resize</span>,<span style="color: black;">off</span>);</span><span style="color: black;">uicontrol(pictzcj,<span style="color: black;">style</span>,<span style="color: black;">text</span>,<span style="color: black;">position</span>,[<span style="color: black;">5</span> <span style="color: black;">150</span> <span style="color: black;">710</span> <span style="color: black;">40</span>],<span style="color: black;">string</span>,<span style="color: black;">m文件注册机(服务端)</span>,<span style="color: black;">FontSize</span>,<span style="color: black;">26</span>);</span><span style="color: black;">uicontrol(pictzcj,<span style="color: black;">style</span>,<span style="color: black;">text</span>,<span style="color: black;">position</span>,[<span style="color: black;">5</span> <span style="color: black;">103</span> <span style="color: black;">710</span> <span style="color: black;">40</span>],<span style="color: black;">string</span>,<span style="color: black;">源代码已上传至原创代码与<span style="color: black;">研究</span>论文Q群</span>,...</span><span style="color: black;"> <span style="color: black;">FontSize</span>,<span style="color: black;">15</span>,<span style="color: black;">FontWeight</span>,<span style="color: black;">bold</span>,<span style="color: black;">ForegroundColor</span>,<span style="color: black;">r</span>);</span><span style="color: black;">%% <span style="color: black;">设备</span>码</span><span style="color: black;">zcjtext1=uicontrol(pictzcj,<span style="color: black;">style</span>,<span style="color: black;">text</span>,<span style="color: black;">position</span>,[<span style="color: black;">20</span> <span style="color: black;">80</span> <span style="color: black;">150</span> <span style="color: black;">25</span>],<span style="color: black;">string</span>,<span style="color: black;"><span style="color: black;">设备</span>码:</span>,<span style="color: black;">FontSize</span>,<span style="color: black;">12</span>);</span><span style="color: black;">zcjfile_input=uicontrol(pictzcj,<span style="color: black;">style</span>,<span style="color: black;">edit</span>,<span style="color: black;">position</span>,[<span style="color: black;">130</span> <span style="color: black;">80</span> <span style="color: black;">510</span> <span style="color: black;">30</span>],<span style="color: black;">string</span>,<span style="color: black;">,</span>FontSize<span style="color: black;">,10);</span></span><span style="color: black;"><span style="color: black;">ztjqmbutton = uicontrol(pictzcj,</span>Style<span style="color: black;">,</span>pushbutton<span style="color: black;">, </span>String<span style="color: black;">, </span>粘贴<span style="color: black;">,</span>Position<span style="color: black;">,,</span>FontSize<span style="color: black;">,10,</span>Callback<span style="color: black;">,</span>ZCM = clipboard(<span style="color: black;">"paste"</span>);set(zcjfile_input,<span style="color: black;">"string"</span>,ZCM);<span style="color: black;">);</span></span><span style="color: black;">%% 注册码</span><span style="color: black;"><span style="color: black;">zcjtext2=uicontrol(pictzcj,</span>style<span style="color: black;">,</span>text<span style="color: black;">,</span>position<span style="color: black;">,,</span><span style="color: black;">string</span><span style="color: black;">,</span>注册码:<span style="color: black;">,</span>FontSize<span style="color: black;">,12);</span></span><span style="color: black;"><span style="color: black;">jieya_output=uicontrol(pictzcj,</span>style<span style="color: black;">,</span>edit<span style="color: black;">,</span>position<span style="color: black;">,,</span><span style="color: black;">string</span><span style="color: black;">,</span><span style="color: black;">,</span>FontSize<span style="color: black;">,10);</span></span><span style="color: black;"><span style="color: black;">zcjbutton = uicontrol(pictzcj,</span>Style<span style="color: black;">,</span>pushbutton<span style="color: black;">, </span>String<span style="color: black;">, </span>复制<span style="color: black;">,</span>Position<span style="color: black;">,,</span>FontSize<span style="color: black;">,10,</span>Callback<span style="color: black;">,</span>clipboard(<span style="color: black;">"copy"</span>,get(jieya_output,<span style="color: black;">"string"</span>));<span style="color: black;">);</span></span><span style="color: black;">%% Dectyption</span><span style="color: black;"><span style="color: black;">encrypt = uicontrol(pictzcj,</span>style<span style="color: black;">,</span>pushbutton<span style="color: black;">,</span>position<span style="color: black;">,,</span><span style="color: black;">string</span><span style="color: black;">,</span>生成注册码<span style="color: black;">,</span>FontSize<span style="color: black;">,12,</span>CallBack<span style="color: black;">,</span>DEncrypt(zcjfile_input,jieya_output);<span style="color: black;">);</span></span><span style="color: black;">%%EXIT</span><span style="color: black;"><span style="color: black;">exiting = uicontrol(pictzcj,</span>style<span style="color: black;">,</span>pushbutton<span style="color: black;">,</span>position<span style="color: black;">,,</span><span style="color: black;">string</span><span style="color: black;">,</span>退出注册机<span style="color: black;">,</span>FontSize<span style="color: black;">,12,</span>CallBack<span style="color: black;">,</span><span style="color: black;">close</span>(pictzcj);<span style="color: black;">);</span></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">为了更好的演示matlab版注册机<span style="color: black;">运用</span>,在客服端添加了一个文件解密功能,用户<span style="color: black;">得到</span>认证后<span style="color: black;">就可</span><span style="color: black;">运用</span>该功能,如未<span style="color: black;">得到</span>则<span style="color: black;">不可</span><span style="color: black;">运用</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>实现原理并不<span style="color: black;">繁杂</span>,<span style="color: black;">这儿</span><span style="color: black;">亦</span>只是抛砖引玉,小伙伴们<span style="color: black;">能够</span><span style="color: black;">按照</span>自己的理解写一款自己的matlab注册机,<span style="color: black;">这儿</span>就不上传完整源代码了。完整源代码已上传至<span style="color: black;"><strong style="color: blue;">原创代码与<span style="color: black;">研究</span>论文Q群</strong></span><strong style="color: blue;">(群号:921720886)</strong>,如有对本文所讲注册机感兴趣的伙伴,可在<strong style="color: blue;">matlab<span style="color: black;">兴趣</span>者</strong>公众号中回复“<span style="color: black;"><strong style="color: blue;">原创</strong></span>”加群获取源代码。<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_png/iag0ZIDyLPHgxPiaxPm0qb7zlmaE5mM91JfiaCSbSRd3ZMIqaZjKn6F7PmcquME3V2NEb3WQo1MrmjqtvrWowDicxw/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
你的话语真是温暖如春,让我心生感激。 楼主继续加油啊!外链论坛加油!
页:
[1]