SGII PHP 加密工具

 

屏幕快照 2018-11-11 下午1.01.39.png

 

下载地址:https://www.sourceguardian.com/downloads/windows/11.2/SourceGuardian-11.2-Evaluation.exe

 

这款软件是采用QT编写的一个PHP加密软件,安装后会在安装目录生成一个Loaders文件夹。里面存放的是各个系统,以及对应的各个PHP版本的插件。

 

软件结构:

1、加密端

2、解密端(以PHP插件形式实现)

 

选择创建一个工程:

屏幕快照 2018-11-11 下午1.05.59.png

 

总体来说使用起来不难,缺点是无法选择整个工程目录。

 

Lock(锁定选项):如锁定ip,不过由于是体验版,是没有办法勾选的。

Advanced(高级选项): 如使用标签,这里直接默认。

 

加密的时候不要选择7.2的php版本,软件会提示找不到加密链接库,我看了一下这个库是在它的安装目录的,不过它还是找不到,有可能是动态加载有问题吧。这里我选择了PHP7.1的选项。

 

加密前:

<?php 

echo "我是加密过的文件。";

?>
<?php

if(!function_exists('sg_load')){$__v=phpversion();$__x=explode('.',$__v);$__v2=$__x[0].'.'.(int)$__x[1];$__u=strtolower(substr(php_uname(),0,3));$__ts=(@constant('PHP_ZTS') || @constant('ZEND_THREAD_SAFE')?'ts':'');$__f=$__f0='ixed.'.$__v2.$__ts.'.'.$__u;$__ff=$__ff0='ixed.'.$__v2.'.'.(int)$__x[2].$__ts.'.'.$__u;$__ed=@ini_get('extension_dir');$__e=$__e0=@realpath($__ed);$__dl=function_exists('dl') && function_exists('file_exists') && @ini_get('enable_dl') && !@ini_get('safe_mode');if($__dl && $__e && version_compare($__v,'5.2.5','<') && function_exists('getcwd') && function_exists('dirname')){$__d=$__d0=getcwd();if(@$__d[1]==':') {$__d=str_replace('\\','/',substr($__d,2));$__e=str_replace('\\','/',substr($__e,2));}$__e.=($__h=str_repeat('/..',substr_count($__e,'/')));$__f='/ixed/'.$__f0;$__ff='/ixed/'.$__ff0;while(!file_exists($__e.$__d.$__ff) && !file_exists($__e.$__d.$__f) && strlen($__d)>1){$__d=dirname($__d);}if(file_exists($__e.$__d.$__ff)) dl($__h.$__d.$__ff); else if(file_exists($__e.$__d.$__f)) dl($__h.$__d.$__f);}if(!function_exists('sg_load') && $__dl && $__e0){if(file_exists($__e0.'/'.$__ff0)) dl($__ff0); else if(file_exists($__e0.'/'.$__f0)) dl($__f0);}if(!function_exists('sg_load')){$__ixedurl='http://www.sourceguardian.com/loaders/download.php?php_v='.urlencode($__v).'&php_ts='.($__ts?'1':'0').'&php_is='.@constant('PHP_INT_SIZE').'&os_s='.urlencode(php_uname('s')).'&os_r='.urlencode(php_uname('r')).'&os_m='.urlencode(php_uname('m'));$__sapi=php_sapi_name();if(!$__e0) $__e0=$__ed;if(function_exists('php_ini_loaded_file')) $__ini=php_ini_loaded_file(); else $__ini='php.ini';if((substr($__sapi,0,3)=='cgi')||($__sapi=='cli')||($__sapi=='embed')){$__msg="\nPHP script '".__FILE__."' is protected by SourceGuardian and requires a SourceGuardian loader '".$__f0."' to be installed.\n\n1) Download the required loader '".$__f0."' from the SourceGuardian site: ".$__ixedurl."\n2) Install the loader to ";if(isset($__d0)){$__msg.=$__d0.DIRECTORY_SEPARATOR.'ixed';}else{$__msg.=$__e0;if(!$__dl){$__msg.="\n3) Edit ".$__ini." and add 'extension=".$__f0."' directive";}}$__msg.="\n\n";}else{$__msg="<html><body>PHP script '".__FILE__."' is protected by <a href=\"http://www.sourceguardian.com/\">SourceGuardian</a> and requires a SourceGuardian loader '".$__f0."' to be installed.<br><br>1) <a href=\"".$__ixedurl."\" target=\"_blank\">Click here</a> to download the required '".$__f0."' loader from the SourceGuardian site<br>2) Install the loader to ";if(isset($__d0)){$__msg.=$__d0.DIRECTORY_SEPARATOR.'ixed';}else{$__msg.=$__e0;if(!$__dl){$__msg.="<br>3) Edit ".$__ini." and add 'extension=".$__f0."' directive<br>4) Restart the web server";}}$__msg.="</body></html>";}die($__msg);exit();}}return sg_load('EE9BD0F64756CAF8AAQAAAAXAAAABGgAAACABAAAAAAAAAD/708p7efzY8vEJAIiMlALizqvEH2zqhMpGayGy5oilahf8T+QfrOHwQPxt4SA2yDO/8qgGmF/BW7f3LWq6YZs4+rZ87Tmt83zMbJ0IjxCZcpcNYosriE1QEkn7H3j2iA2EaiYiPF/3IBHAAAAqAAAAD+D1xFfCOXFoy0wsjLyrC8DqN4PQUN997mRZ1+klqtTkAtw4Tdj6gmh4/HlDbck0oX1kQzRqvWxsNOe0omII0NKw9ybtHYskm+Ed6hYnwODI6rfXCH/TQKH1R6IFNTwrpM+5hnIbX60YpBTxecGUWgBEv1CVsDzYQqFPkSucK7OdaIaYM8sVnfW9EwwoZV/bi+gb/aZDvgMyDnmktk3Ew42BXukNRZNtQAAAAA=');

 

缺点:体积变得庞大不堪,而且依旧依赖于PHP。没有实现分离PHP解释器。

官网:Our PHP encoder protects your PHP code by compiling the PHP source code into a binary bytecode format, which is then 

意思是说会将源码编译成二进制的字节码。但是体验版好像还是字符串,并不是二进制的格式。从还要加<?php ?>就可以看出来,运行还是需要PHP环境。

 

PHP官网有一个zend的加密,堪称最强。完全脱离PHP,即使你不用php环境依旧可以运行。它自身实现了一套语法解析和执行工具。不过好像更新很慵懒,被好多人弃用。

 

现如今的加密种类:

1、文本格式加密(不需要插件):毫无加密性。

2、插件形式加密(需要解密插件例如SGII):加密性能一般,有插件完全可以分析出加密流程。

3、虚拟机方式(zend):这样的基本上就是完全实现了一套自身的解析器。也可以解密,但是代价太大。基本没人去做。

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值