Apache'de Trace Metodunu Açma ve Kapatma | |||||
(+) Birebir denenmiştir ve başarıyla uygulanmıştır. Apache'de varsayılan olarak Trace methodu kapalı gelir. Bunu aşağıda görebilmekteyiz: telnet 127.0.0.1 80 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. TRACE / HTTP/1.0 HTTP/1.1 405 Method Not Allowed Date: Tue, 17 Oct 2017 07:47:31 GMT Server: Apache/2.4.7 (Ubuntu) Allow: Content-Length: 297 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>405 Method Not Allowed</title> </head><body> <h1>Method Not Allowed</h1> <p>The requested method TRACE is not allowed for the URL /.</p> <hr> <address>Apache/2.4.7 (Ubuntu) Server at 127.0.1.1 Port 80</address> </body></html> Connection closed by foreign host. a. Trace Methodunu Açma Apache'de Trace methodunu açmak için apache2.conf dosyası açılır. sudo gedit /etc/apache2/apache2.conf Dosyanın en altına aşağıdaki kod satırı eklenir: TraceEnable on Ardından apache2 servisi yeniden başlatılır. service apache2 restart Böylelikle trace talebinde bulunabilir duruma geliriz: telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1. Escape character is '^]'. TRACE / HTTP/1.0 Test: A // Test: A header'ı gönderiliyor Deneme: B // Deneme: b header'ı gönderiliyor. HTTP/1.1 200 OK Date: Tue, 17 Oct 2017 07:51:43 GMT Server: Apache/2.4.7 (Ubuntu) Connection: close Content-Type: message/http TRACE / HTTP/1.0 Test: A // Test: A header'ı alınıyor Deneme: B // Deneme: b header'ı alınıyor. Görüldüğü üzere trace talebimiz kabul edilmiştir ve gönderdiğimiz paket aynı şekilde geri dönmüştür. Dolayısıyla trace methodu açık durumdadır. b. Trace Methodunu Kapama Apache'de trace methodunu kapamak için apache2.conf dosyası açılır. sudo gedit /etc/apache2/apache2.conf Dosyanın en altına aşağıdaki kod satırı eklenir: TraceEnable off Ardından apache2 servisi yeniden başlatılır. service apache2 restart Böylece trace talebi kapatılmış olur. telnet 127.0.0.1 80 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. TRACE / HTTP/1.0 Test: A Deneme: B HTTP/1.1 405 Method Not Allowed Date: Tue, 17 Oct 2017 07:54:57 GMT Server: Apache/2.4.7 (Ubuntu) Allow: Content-Length: 297 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>405 Method Not Allowed</title> </head><body> <h1>Method Not Allowed</h1> <p>The requested method TRACE is not allowed for the URL /.</p> <hr> <address>Apache/2.4.7 (Ubuntu) Server at 127.0.1.1 Port 80</address> </body></html> Connection closed by foreign host. Yararlanılan Kaynak
|
|||||
![]() |
|||||
|
|||||
Yorumlar |
|||||
Henüz yorum girilmemiştir. | |||||
Yorum Ekle | |||||