经常加密php的主要是zend和PHP Screw,这些都需要安装插件。如果是小网站,这样加密也可以。前面有人介绍过。我只是做个批处理,批量加密。一定注意备份
1.jiami.php
<?php function RandAbc($length=""){//返回随机字符串 $str="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; return str_shuffle($str); } echo $file=$_SERVER["argv"][1]; if (!empty($file)){ $filepath=$file; $path_parts= pathinfo($filepath); $filename=$path_parts["basename"]; $T_k1=RandAbc();//随机密匙1 $T_k2=RandAbc();//随机密匙2 $vstr=file_get_contents($filename);//要加密的文件 $v1=base64_encode($vstr); $c=strtr($v1,$T_k1,$T_k2);//根据密匙替换对应字符。 $c=$T_k1.$T_k2.$c; $q1="o0o0o00ll11l1"; $q2="lll1ll1l1l1l1"; $q3="o0ooo0o0o0ooo0"; $q4="o0o0o0ooo0o0"; $q5="ll1ll1l1l1l1l"; $q6="ll11l1l1l1ll1"; $s='$'.$q6.'=urldecode("%6E1%7A%62%2F%6D%615%5C%76%740%6928%2D%70%78%75%71%79%2A6%6C%72%6B%64%679%5F%65%68%63%73%77%6F4%2B%6637%6A");$'.$q1.'=$'.$q6.'{3}.$'.$q6.'{6}.$'.$q6.'{33}.$'.$q6.'{30};$'.$q3.'=$'.$q6.'{33}.$'.$q6.'{10}.$'.$q6.'{24}.$'.$q6.'{10}.$'.$q6.'{24};$'.$q4.'=$'.$q3.'{0}.$'.$q6.'{18}.$'.$q6.'{3}.$'.$q3.'{0}.$'.$q3.'{1}.$'.$q6.'{24};$'.$q5.'=$'.$q6.'{7}.$'.$q6.'{13};$'.$q1.'.=$'.$q6.'{22}.$'.$q6.'{36}.$'.$q6.'{29}.$'.$q6.'{26}.$'.$q6.'{30}.$'.$q6.'{32}.$'.$q6.'{35}.$'.$q6.'{26}.$'.$q6.'{30};eval($'.$q1.'("'.base64_encode('$'.$q2.'="'.$c.'";eval(\'?>\'.$'.$q1.'($'.$q3.'($'.$q4.'($'.$q2.',$'.$q5.'*2),$'.$q4.'($'.$q2.',$'.$q5.',$'.$q5.'),$'.$q4.'($'.$q2.',0,$'.$q5.'))));').'"));'; $s='<? '.$s. ' ?>'; echo $s; //生成 加密后的PHP文件 $fpp1 = fopen($filepath,'w'); fwrite($fpp1,$s) or die('写文件错误'); echo '加密成功!'; }
2.d.bat
@echo off & setlocal EnableDelayedExpansion for /f "delims=" %%i in ('"dir /a/s/b/on *.php"') do ( set file=%%~fi set 不要这行file=!file:%cd%/=! set file=!file:/=/! E:\\websystem\\phpnow\\php-5.2.14-Win32\\php.exe E:\\websystem\\phpnow\\htdocs\\sme.bak\\jiami.php !file! echo !file! echo !file! >> 内容.txt ) pause

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version
Chinese version, very easy to use

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.
