LFI
phpCopy code<?php
include($_GET['file']);
?>phpCopy code<?php
$file = basename($_GET['file']);
include("/var/www/html/" . $file);
?>pythonCopy code@app.route('/view')
def view():
file = request.args.get('file')
with open(file, 'r') as f:
return f.read()PHP Example
Vulnerable Code:
Reason for Vulnerability:
Fixed Code:
Reason for Fix:
Last updated