|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?加入我们
x
本帖最后由 QAQ 于 2019-4-29 17:10 编辑
- <?php
- function input(){ //控制台输入字符串 (仅限Windows操作系统,失败返回空数组)
- $fn = "D:\".sha1(rand().time()).".cmd";
- $cmd = "@echo off\r\n";
- $cmd .= "set/p a=\r\n";
- $cmd .= "echo. %a%";
- file_put_contents($fn,$cmd);
- if(!file_exists($fn) || isset($_SERVER['SERVER_PORT'])){
- @unlink($fn);
- return array();
- }
- exec($fn,$ret);
- unlink($fn);
- return substr($ret[0],1);
- }
- echo "Input Text:";
- $text = input();
- if($text == array()){
- echo "Error!";
- while(1);
- }
- $md5 = md5($text);
- echo "Text:{$text} MD5:{$md5}";
- while(1);
复制代码 |
|