Interesting, today I came to know there is a way through telnet to get the requests from the server.
Normally we don't see what sent between the web server and the client. Here is the way we can see what's actually received through the telnet.
To connect to the web server - open a command line and type the command
telnet host port
telnet localhost 8080
Then you'll get connected to the particular web server and then you can enter any HTTP command you want such as GET, HEAD.
If you need to request for a web page from the web server you can type the HTTP request as follows.
GET pageName HTTP/1.0
HEAD pageName HTTP/1.0
Hit enter twice. Then you will get a response.
You'll get a 404 status if page not found, 301 if the page is moved permanently and 401 if you are not authorized to access the page. More HTTP status codes can be found here.
About Me
Showing posts with label requests. Show all posts
Showing posts with label requests. Show all posts
Monday, 1 June 2009
Thursday, 18 September 2008
Extract total number of requests hits
Below is the command to calculate no of time projects accessed using the url. The informations are retrieved from log file where all the requests are logged.
cut -d ' ' -f 7 ssl_request_log |grep '/sf/'|cut -d '/' -f 3|sort|uniq -c
cut -d ' ' -f 7 ssl_request_log |grep '/sf/'|sort|uniq -c
Sample log file
[31/Aug/2008:05:50:08 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /asf-help/RoboHelp_CSH.js HTTP/1.1" 7677
[31/Aug/2008:05:50:08 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /wsf-images/masthead/logo.gif HTTP/1.1" 2430
[31/Aug/2008:05:50:09 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /fsf-images/masthead/dropdown.gif HTTP/1.1" 49
[31/Aug/2008:05:50:09 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /nsf-images/masthead/help.gif HTTP/1.1" 402
cut -d ' ' -f 7 ssl_request_log |grep '/sf/'|cut -d '/' -f 3|sort|uniq -c
cut -d ' ' -f 7 ssl_request_log |grep '/sf/'|sort|uniq -c
Sample log file
[31/Aug/2008:05:50:08 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /asf-help/RoboHelp_CSH.js HTTP/1.1" 7677
[31/Aug/2008:05:50:08 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /wsf-images/masthead/logo.gif HTTP/1.1" 2430
[31/Aug/2008:05:50:09 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /fsf-images/masthead/dropdown.gif HTTP/1.1" 49
[31/Aug/2008:05:50:09 +0200] 0.0.0.0 SSLv3 RC4-MD5 "GET /nsf-images/masthead/help.gif HTTP/1.1" 402
Subscribe to:
Posts (Atom)
