有人试图在我的服务器上做一些SQL注入。然而,有一个目录被调用' OR 1=1 LIMIT 1 -- -
,我试图通过SSH或FileZilla删除它,但问题是,通过FileZilla它告诉我:
Error: Failed to retrieve directory listing
Status: Deleting "/public_html/admin/images/' OR 1=1 LIMIT 1 -- -"
Command: CWD /public_html/admin/images
Response: 250 Directory successfully changed.
Command: DELE ' OR 1=1 LIMIT 1 -- -
Response: 550 Delete operation failed.
Status: Retrieving directory listing of "/public_html/admin/images"...
Status: Directory listing of "/public_html/admin/images" successful
在另一方通过直接SSH它将整个目录分成3个目录,我真的不明白发生了什么。
chmod: cannot access "'": No such file or directory
chmod: cannot access 'OR': No such file or directory
chmod: cannot access '1=1': No such file or directory
chmod: cannot access 'LIMIT': No such file or directory
chmod: cannot access '1': No such file or directory
chmod: cannot access '-': No such file or directory
发布于 2019-05-24 10:57:28
为了在ssh进入主机时删除该文件,看起来你只是想输入这个:
myHost-$ rm OR 1=1 LIMIT 1 -- -
这不会有几个原因,第一个是文件名充满空格而'rm'将它解释为你试图删除的文件列表(因此你得到一个'文件'的原因没有找到'错误的每个空格分隔的字符串部分)。尝试将整个事情放在双引号中:
myHost-$ rm "' OR 1=1 LIMIT 1 -- -"
编辑:只是为了添加,在将来,如果你得到一些像这样的文件名并且不确定如何删除它,如果你尝试在某个地方的测试目录中重新创建相同的文件名,你将为自己省去一些可能的痛苦。然后试验一下。rm
删除在这种情况下可能没有的内容很容易 (特别是如果您使用-f
标记,如评论中所建议的那样)
https://stackoverflow.com/questions/-100003150
复制相似问题