Created
July 12, 2017 19:54
-
-
Save sergix44/729f9e82fb0e1a4a988ede2381ea2b4a to your computer and use it in GitHub Desktop.
Infinite download script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-Type: application/octet-stream'); | |
header('Content-Disposition: attachment; filename="dummy.bin"'); | |
set_time_limit(0); | |
$random_data = random_bytes(1000000); | |
while(true) { | |
if(connection_aborted() === 1) { | |
ob_end_clean(); | |
die(); | |
} | |
echo $random_data; | |
ob_flush(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment