SQL注入攻击:有关在以下代码片段中放置了攻击向量的位置的说明。

时间:2018-09-14 15:23:51

标签: sql security sql-injection owasp

<?php 
include_once "lib/db.php";

include "lib/sql_form.php";


if(!$_GET['id'])

$_GET['id'] = str_replace("/", "", $_SERVER['PATH_INFO']);

$query = "SELECT * FROM listings WHERE id = ".$_GET['id'];

$result = mysql_query($query);

$line = mysql_fetch_array($result, MYSQL_ASSOC);

if($line['status'] == "DELETED"){ print("This file is deleted."); exit;} 


$_POST['form_id'] = $line['form_id'];

$_POST['fields'] = split(",", $line['fields']);

excel_report_results();

?>

我需要了解攻击向量的位置,以及查询一旦执行后将转换为什么内容,以及攻击如何进行?

0 个答案:

没有答案