ºìÁªLinuxÃÅ»§
Linux°ïÖú

¹ØÓÚË«ÒýºÅºÍµ¥ÒýºÅÒÔ¼°·´Ð±¸ÜµÄÓ÷¨Ð¡½á

·¢²¼Ê±¼ä:2008-08-19 15:47:59À´Ô´:ºìÁª×÷Õß:JinXian
ÒÔǰѧϰlinuxµÄshell£¬ÏÖÔÚѧϰphp£¬Àï±ß¶¼ÓÐË«ÒýºÅ¡¢µ¥ÒýºÅºÍ·´Ð±¸ÜµÄÓ÷¨£¬ÏÖÔÚ×ܽáһϲ»Í¬¡£

ÓÃË«ÒýºÅÀ¨ÆðµÄ×Ö·û´®ÔÚPHP½Å±¾ÖÐ×îΪ³£¼û£¬ÒòΪËüÃÇÌṩÁË×î´óµÄÁé»îÐÔ£¬ÆäÔ­ÒòÊDZäÁ¿ºÍתÒåÐòÁж¼»áµÃµ½ÏàÓ¦µÄ½âÎö¡£

ÒýÓÃ:
PHPÖпÉʶ±ðµÄתÒåÐòÁкÍÌØÊâ×Ö·û

תÒåÐòÁС¡Ãè Êö

\n¡¡»»Ðзû

\r¡¡»Ø³µ

\t¡¡Ë®Æ½ÖƱí·û

ÌØÊâ×Ö·û¡¡ÃèÊö

\\¡¡·´Ð±¸Ü

\$¡¡ÃÀÔª·û

\"¡¡Ë«ÒýºÅ

\[0-7]{1,3}¡¡°Ë½øÖƼǷ¨

\x[0-9A-Fa-f]{1,2}¡¡Ê®Áù½øÖƼǷ¨


ÔÚlinuxµÄshellÖÐÔÚûÓдò¿ª-eÑ¡ÏîµÄʱºò£¬Ö»½âÎö\\,\$,\"(Éϱ߻ÆÉ«±³¾°µÄÌØÊâ×Ö·û£©£¬³ýÁËÕâЩ»¹°üÀ¨shellÖеÄÆäËüÌØÊâ×Ö·û£¬°üÀ¨\` (·´Ð±¸Ü+ºóÒýºÅ£©ºóÒýºÅÖ¸µÄÊǼüÅÌ×óÉϽǵķûºÅ¡£

¹ØÓÚË«ÒýºÅµÄ×ܽ᣺

1. ¶¼½âÎöÏàÓ¦µÄ±äÁ¿¡££¨shellÖв»¹ÜÓÐûÓдò¿ª-eÑ¡Ï½âÎö£¬¶þÕß²»ÓÃÑ¡ÒýºÅÒ²½âÎö£©

2. ShellÖпÉÒÔ½âÎöµÄתÒåÐòÁбÈPHP¶à.³ýÁË\n,\r,\tÖ®Í⣬shellÖл¹ÓÐ\a,\b,\c,\f,\v.£¨¶¼ÐèÒªÔÚ°üÀ¨×ªÒå×Ö·ûµÄ×Ö·û´®¼ÓË«ÒýºÅ£¬shell»¹ÐèÒª¼ÓÉÏ-eÑ¡Ï

3. ¶¼½âÎöÌØÊâ×Ö·û£¨Éϱ߻ÆÉ«±³¾°µÄÌØÊâ×Ö·û£©£¨ÔÚshell²»¼ÓË«ÒýºÅ£¬Ò²½âÎö¡£µ«ÊÇÔÚphpÖбØÐë¼Ó£©
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ