sqlmap在https情況下的一個錯誤


 

 

 

 

對於https網站,使用sqlmap可能會出現如下錯誤。使用–force-ssl無效。

 

https證書有問題

 

 



方法

本地建立proxy.php,內容為

<?php
 
$url = "https://xxxxx.com/id=2";
$sql = $_GET[s];
$s = urlencode($sql);
$url = $url.$sql;
// $params = "email=$s&password=aa";
//echo $params;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // https請求 不驗證證書和hosts
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)');
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
  
// curl_setopt($ch, CURLOPT_POST, 1);    // post 提交方式
// curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
  
$output = curl_exec($ch);
curl_close($ch);
echo $output;
$a = strlen($output);
echo $a;

然后直接扔sqlmap跑就ok,,可以先本地訪問一下

 

直接跑

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM