Web服務器的安全和攻擊防范(8)_Windows教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!
      偽造Web請求(二)

        注意b的值必須以URL編碼格式輸入。要將字符串進行URL編碼,可以使用一個簡單的PHP程序,例如:



      kris@valiant:~/www < cat urlencode.php #! /home/kris/bin/php -q < ?php print urlencode($argv[1])."n"; ? > kris@valiant:~/www < ./urlencode.php "this is a test" this+is+a+test

        發送HTTP POST請求只是稍微復雜一點:現在應該在這個請求中包含一個合法的Content-Type頭以及正確的內容長度字節數。下面是具體過程:



      kris@valiant:~/www < telnet valiant 80 Trying 193.102.57.3... Connected to valiant.koehntopp.de. Escape character is '^]'. POST /~kris/test.php HTTP/1.0 Host: valiant.koehntopp.de Referer: http://www.attacker.com/die_sucker_die.html Content-Type: application/x-www-form-urlencoded Content-Length: 16 b=this+is+a+test HTTP/1.1 200 OK Date: Sat, 08 Apr 2000 06:55:11 GMT Server: Apache/1.3.9 (Unix) (SuSE/Linux) PHP/4.0RC2-dev mod_ssl/2.4.7 OpenSSL/0.9.4 X-Powered-By: PHP/4.0RC2-dev Connection: close Content-Type: text/html The value of b is this is a test The value of HTTP_REFERER is http://www.attacker.com/die_sucker_die.html Connection closed by foreign host.

      來源:網絡搜集//所屬分類:Windows教程/更新時間:2013-04-15
      相關Windows教程