phpjm解密程序,也适用于其他混淆加密的破解
<?php
$file = 'plugin.php'; //要破解的文件 $fp = fopen($file, 'r');
$str = fread($fp, filesize($file));
fclose($fp); copy($file, '0_'.$file); $n = 1;
while($n < 10){
$code = strdecode($str);
if($n == 1){
$code = str_replace("__FILE__", "'0_$file'", $code);
} $replace = '$decode'.$n.'=trim';
if(strpos($code, 'eval(') > 0){
$code = str_replace('eval(', $replace.'(', $code);
}else{
preg_match("/@\\$(.*)\(\\$(.*),(.*)\(/isU", $code, $res);
$code = str_replace($res[3], "'$replace", $code);
} $code = preg_replace('/\\$(.*)=false;(.*?)\(\);/', '', $code); //上一版本
$code = preg_replace('/\|\|@\\$(.*?)\(\);/', '|| print("ok");', $code); $code = destr($code);
$tmp_file = 'detmp'.$n.'.php';
file_put_contents($tmp_file, $code);
include($tmp_file); $val = 'decode'.$n;
$str = $$val; unlink($tmp_file); if(strpos($str, ';?>') === 0){
$decode = $str;
break;
} $str = "<?php\r\n". $str;
$n++;
} $decode = preg_replace("/^(.*)exit\('Access Denied'\); /", "<?php\r\n", $decode);
$del = strrchr($decode, 'unset');
$decode = str_replace($del, "\r\n?>", $decode);
file_put_contents($file.'.de.php' ,$decode);
unlink('0_'.$file);
echo 'done'; ////////////
function val_replace($code, $val, $deval){
$code = str_replace('$'.$val.',', '$'.$deval.',', $code);
$code = str_replace('$'.$val.';', '$'.$deval.';', $code);
$code = str_replace('$'.$val.'=', '$'.$deval.'=', $code);
$code = str_replace('$'.$val.'(', '$'.$deval.'(', $code);
$code = str_replace('$'.$val.')', '$'.$deval.')', $code);
$code = str_replace('$'.$val.'.', '$'.$deval.'.', $code);
$code = str_replace('$'.$val.'/', '$'.$deval.'/', $code);
$code = str_replace('$'.$val.'>', '$'.$deval.'>', $code);
$code = str_replace('$'.$val.'<', '$'.$deval.'<', $code);
$code = str_replace('$'.$val.'^', '$'.$deval.'^', $code);
$code = str_replace('$'.$val.'||', '$'.$deval.'||', $code);
$code = str_replace('($'.$val.' ', '($'.$deval.' ', $code);
return $code;
} function fmt_code($code){
global $vals,$funs;
preg_match_all("/\\$[0-9a-zA-Z\[\]']+(,|;)/iesU", $code, $res);
foreach($res[0] as $v){
$val = str_replace(array('$',',',';'), '', $v);
$deval = destr($val, 1);
$vals[$val] = $deval;
$code = val_replace($code, $val, $deval);
} preg_match_all("/\\$[0-9a-zA-Z\[\]']+=/iesU", $code, $res);
foreach($res[0] as $v){
$val = str_replace(array('$','='), '', $v);
$deval = destr($val, 1);
$vals[$val] = $deval;
$code = val_replace($code, $val, $deval);
} preg_match_all("/function\s[0-9a-zA-Z\[\]]+\(/iesU", $code, $res);
foreach($res[0] as $v){
$val = str_replace(array('function ','('), '', $v);
$deval = destr($val, 1);
$funs[$val] = $deval;
$code = str_replace('function '.$val.'(', 'function '.$deval.'(', $code);
$code = str_replace('='.$val.'(', '='.$deval.'(', $code);
$code = str_replace('return '.$val.'(', 'return '.$deval.'(', $code);
}
return $code;
} function strdecode($str){
$len = strlen($str);
$newstr = '';
for($i=0; $i<$len; $i++){
$n = ord($str[$i]);
$newstr .= decode($n);
}
return $newstr;
} function decode($dec){
if(($dec > 126 || $dec<32) && $dec<>13 && $dec<>10){
return '['.$dec.']';
}else{
return chr($dec);
}
} function destr($str, $val=0){
$k = 0;
$num = '';
$n = strlen($str);
$code = '';
for($i=0; $i<$n; $i++){
if($str[$i] == '[' && ($str[$i+1]==1 || $str[$i+1]==2)){
$k = 1;
}elseif($str[$i] == ']' && $k==1){
$num = intval($num);
if($val==1){
$num = 97 + fmod($num, 25);
}
$code .= chr($num);
$k = 0;
$num = null;
}else{
if($k == 1){
$num .= $str[$i];
}else{
$code .= $str[$i];
}
}
}
return $code;
}
?>
<?php
//解密 PHP神盾 $file = 'Code2.php'; $fp = fopen($file, 'r');
$str = fread($fp, filesize($file));
fclose($fp); $code = strdecode($str); //for func de1
preg_match("/;(.*)\]='(.*?)';for\(/e", $code, $res);
$c1 = $res[2]; //for func de1
preg_match("/;(.*)=(.*)\('(.*)'\);(.*);(.*)$/e", $res[1], $rs);
$c2 = $rs[3]; //for func de2
preg_match("/'\(@(.*?)\(\\\'(.*?)\\\'\)\)/e", $code, $res);
$c3 = $res[2]; preg_match("/'\.(.*?)\.'/e", $c3, $r);
preg_match("/\('(.*?)','/e", $r[1], $r2);
$c4 = $r2[1];
$c4 = base64_decode(de1(destr($c4), 1));
$c3 = str_replace($r[0], $c4, $c3); $funstr = gzuncompress(base64_decode($c3)).base64_decode($c1);
preg_match("/if(.*),'(.*?)'\)\)/e", $funstr, $res);
$c5 = $res[2]; //find main code
preg_match("/'\(@(.*)\(\\\'(.*?)\\\'\.\(/e", $code, $res);
$c = $res[2];
preg_match("/'\.(.*?)\.'/e", $c, $r);
preg_match("/\('(.*?)','/e", $r[1], $r2);
$c6 = base64_decode(de1(destr($r2[1]), 1));
$c = str_replace($r[0], $c6, $c); //find $de2
preg_match("/\"\.\((.*)='(.*?)'\)\);/e", $code, $res);
$de2 = destr($res[2]);
$x = ($de2.=de2($de2));
$c .= $x;
$decode = gzuncompress(base64_decode($c)); $str = explode('<!--<?php endif;?>', $decode);
$str = explode('?><?php $GLOBALS', $str[1]);
$decode = $str[0].'?>'; echo $decode; file_put_contents($file.'.de.php' ,$decode); ////////////////////////////// function de1($de1,$str2=''){
global $c1,$c2;
if(!$str2)return(base64_decode(destr($de1)));
$s9=de1($c2);
for($i=0;$i<strlen($de1);$i++)
$s9.=ord($de1{$i})<245?((ord($de1{$i})>140&&ord($de1{$i})<245)?chr(ord($de1{$i})/2):$de1{$i}):"";
return(base64_decode($s9));
} function de2(&$de2){
global $c5;
if(strstr($de2,$c5)){
$de2=str_replace($c5,'',$de2);
$de2=gzuncompress($de2);
}
if(strstr($de2,$c5)){
$de2=str_replace($c5,'',$de2);
de2($de2);
} } ///////////////////////////// function strdecode($str){
$len = strlen($str);
$newstr = '';
for($i=0; $i<$len; $i++){
$n = ord($str[$i]);
$newstr .= decode($n);
}
return $newstr;
} function decode($dec){
if(($dec > 126 || $dec<32)){
return '['.$dec.']';
}else{
return chr($dec);
}
} function destr($str){
$k = 0;
$num = '';
$n = strlen($str);
$code = '';
for($i=0; $i<$n; $i++){
if($str[$i] == '['){
$k = 1;
}elseif($str[$i] == ']'){
$num = intval($num);
$code .= chr($num);
$k = 0;
$num = null;
}else{
if($k == 1){
$num .= $str[$i];
}else{
$code .= $str[$i];
}
}
}
return $code;
}
?>
phpjm解密程序,也适用于其他混淆加密的破解的更多相关文章
- 解析php混淆加密解密的手段,如 phpjm,phpdp神盾,php威盾
原文 解析php混淆加密解密的手段,如 phpjm,phpdp神盾,php威盾 php做为一门当下非常流行的web语言,常常看到有人求解密php文件,想当年的asp也是一样.一些人不理解为什么要混淆( ...
- 破解phpjm.net加密,解密程序,全部公布
原文:破解phpjm.net加密,解密程序,全部公布 2014-05-23更新: 很久没人找我解密了,看来这加密已过时,现公布我这边最新的解密工具. 若有解不出的可联系qq: 267014855 (不 ...
- base64随机字符混淆加密、解密-美拍视频地址解密,反推加密算法
用火车头测试采集美拍的数据时无意中发现美拍的视频地址是一段加了混淆字符串的base64代码.如下图 于是好奇之下研究了下解密算法.具体过程省略800字.发现美拍的视频解密是通过js完成,于是找到了具体 ...
- PHP加密解密数字,适用于URL加密。
本博主最近正在建设一个9元包邮的网站,希望各位光临指导一些意见: 9元包邮 http://www.jiubaou.com/ <?php /** * 加密解密类 * 该算法仅支持加密数字.比较适用 ...
- php混淆加密解密实战
在查看别人的php源码的时候,我们经常会看到加密后的php代码.那么php加密原理是什么呢?怎么解密呢? 混淆加密 我们从百度随便搜索一个加密网站,例如:http://dezend.qiling.or ...
- [.NET产品源码保护].NET防止反编译(非混淆加密)
.NET产品源码保护产生的背景: .NET源码加密方案支持C#及VB.NET等语言开发的ASP.NET及WINFORM应用.利用.NET支持托管代码与非托管代码共存的特性,将C#代码经过处理放于非托管 ...
- 小程序 之使用HMACSHA1算法加密报文
首先说说我们前端常用的加密技术, 我们常用的加密技术有:如MD5加密,base64加密 今天要说的是HMACSHA1加密技术 先介绍下什么是SHA1算法, 安全哈希算法(Secure Hash Alg ...
- 【Java】通过DES加密和解密工具,对字符串进行加密和解密操作
分享一个非常不错的字符串加密和解密的程序. 可以指定不同的密钥对同一字符串进行不同的加密操作,增强加密性能. Java代码如下: package com.app; import java.securi ...
- [asp.net mvc 奇淫巧技] 05 - 扩展ScriptBundle,支持混淆加密javascript
一.需求: 在web开发中,经常会处理javascript的一些问题,其中就包括js的压缩,合并,发布版本以及混淆加密等等问题.在asp.net 开发中我们使用ScriptBundle已经可以解决ja ...
随机推荐
- Docker安装及部署实例.Net Core
1.什么是Docker Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱 ...
- spring的基础配置
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
- 003/kubernetes基础:开启云原生之门(Mooc)
一.简介:(https://www.imooc.com/learn/978) 在2017年Kubernetes战胜了两个强大的竞争对手Swarm和Mesos,成为容器管理与调度编排领域的首选平台和事实 ...
- 建立 Active Directory域 ----学习笔记
第五章 建立 Active Directory域 1.工作组和域的理解 a.工作组是一种平等身份环境,各个计算机之间各个为一个独立体,不方便管理和资源共享. b.域环境一般情况下满足两类需求, ...
- 关于存储过程的一些sql
1.关于事务的回滚Set XACT_ABORT ON; 开启为on时 ,如果事务语句产生运行错误 ,将整个事务终止进行回滚,Off时只回滚产生错误的语句. 2.获取事务语句中上一次插入值的行号@@ID ...
- [Python3 填坑] 012 字典的遍历在 Python2 与 Python3 中区别
目录 1. print( 坑的信息 ) 2. 开始填坑 2.1 Python2 中字典的遍历 2.2 Python3 中字典的遍历 2.3 结论 1. print( 坑的信息 ) 挖坑时间:2019/ ...
- ./configure 配置文件时出错checking for g++... no
checking for g++... no checking for c++... no checking for gpp... no checking for aCC... no 缺少C++编译器 ...
- P4514 上帝造题的七分钟(二维树状数组)
P4514 上帝造题的七分钟 二维树状数组 差分维护区间加法,区间求和 #include<cstdio> int read(){ ,f=; ') f=f&&(c!='-') ...
- 如何在CentOS 7上安装newman
前提:先安装nodejs,详见:如何在CentOS 7上安装Node.js和npm #sudo npm install -g newman 结果: /usr/local/bin/newman -> ...
- 7、前端知识点--关于Array.from详解
1.Array.from()方法就是将一个类数组对象 或 可遍历对象 或 可迭代对象 转换成一个真正的数组.浅拷贝的数组实例. 2.那么,什么是类数组对象呢?所谓类数组对象,最基本的要求就是具有len ...