Код редкой читаемости

    Date: 05/21/06 (Code WTF)    Keywords: php

    Редкой, практически незаметной.

    (MS batch file)

    for /f "usebackq tokens=1,2" %%i in (`php -r "echo '1 '.trim(shell_exec('ipconfig /all'.chr(124).'find '.chr(34).'DNS'.chr(34).chr(124).'sed '.chr(34).'s/ \.//g;s/[^0-9\.]//g'.chr(34))); echo chr(10).'2 '; $a = trim(shell_exec('ipconfig /all'.chr(124).'grep -e '.chr(34).'^ *[0-9][0-9\.]*$'.chr(34).chr(124).'sed '.chr(34).'s/ //g'.chr(34))); echo ($a == '' ? '127.0.0.1' : $a);"`) do php -r "system('cat tdifw.conf%%i'.chr(124).'sed '.chr(34).'s/CUR_DNS%%i=[0-9\.]*/CUR_DNS%%i=%%j/'.chr(34).' '.chr(62).' tdifw.conf'.(%%i + 1));"

    Source: http://community.livejournal.com/code_wtf/38832.html

« News from the edge: Vista... || SQL »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home