2013-05-02 49 views
0

您好,只是在cakephp中聽到一個允許sql inyection的錯誤; https://twitter.com/cakephp/status/328610604778651649Sqlmap內嵌參數

我試圖用sqlmap測試我的網站,但我無法找到如何指定參數。

我測試的網址是;

http://127.0.0.1/categories/index/page:1/sort:id/direction:asc 

,我想SQLMAP inyect的參數在URL(網頁:,排序:,方向:)

我嘗試運行;

python sqlmap.py -u "http://127.0.0.1/categories/index/page:1/sort:id/direction:asc" 

但沒有...... 任何線索?謝謝!

回答

0

在CakePHP中有passed arguments,named parametersquerystring parameters

傳遞的參數看起來像.../index/arg$this->request->pass[0],其中「0」是數組索引訪問。命名參數看起來像.../index/key:value,可以通過$this->request->named['key']訪問。查詢字符串參數看起來像.../index?key = value and are accessed with $ this-> request-> query ['key']`。

你的URL使用命名參數所以它應該是這樣的(沒有問號):

http://127.0.0.1/categories/index/page:1/sort:id/direction:asc 

編輯:

從CakePHP使用了mod_rewrite,你必須指定作爲解釋的參數在sqlmap wiki

+2

這不回答我的問題,我的問題是如何使用sqlmap(sqlmap.org)與cakephp – Tim 2013-05-02 22:09:27

+1

謝謝!編輯沒有回答我的問題!,我會嘗試 'python sqlmap.py -u「http://127.0.0.1/categories/index/page:*/sort:*/direction:*」' – Tim 2013-05-03 01:16:27

+0

是的,對不起,我誤解了原來的問題。 – 2013-05-03 12:23:27