Get the App
SLTechnology News&Howtos  ›  Network Security  › 

When select into outfile writes a file, the path contains a Chinese solution.

Shulou Source: shulou.com Published: 2022-06-01 07:56:00 10月03日 Update

Set character_set_client='gbk'

Set character_set_connection='gbk'

Set character_set_database='gbk'

Set character_set_results='gbk'

Set character_set_server='gbk'

Select'2' into outfile'c:\\ Yes\\ 22b.txt'

Many people should encounter this kind of problem, and the name of the file written out finally is garbled.

In fact, as long as the Chinese URL coding (GBK), here is the gbk format of url coding, most of the tools url coding is utf8 format.

For example:

"Chinese path" = >% url encoding in E4%B8%AD%E6%96%87%E8%B7%AF%E5%BE%84 / / utf8 format

"Chinese path" = >% url encoding in D6%D0%CE%C4%C2%B7%BE%B6 / / gbk format

In this way, we can easily solve the problem that the injection point has high permissions but encounters the Chinese path.

Provide an online coding website:

Http://www.mytju.com/classcode/tools/urlencode_gb2312.asp

Tags: Code Chinese format path problem file garbled tool file name permission website online method Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB macOS Redmi NVidia vpn