Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

mTCP DOS - NC documentation issue (design bug)? (Announce)

posted by Arjay, 20.07.2010, 14:07
(edited by Arjay on 20.07.2010, 22:06)

Just referenced the mTCP version of NC in this forum reply. To be honest I've been too busy with my own coding/away from the keyboard activities to test mTCP yet.

However I did note the following line in http://brutman.com/mTCP/nc.txt:

"(If you send "GET /" without the quotes and press Enter, you will get a web page back!)"

I don't know if this is the case with the mTCP version of NC but this is wrong you shouldn't get a webpage back on most servers if you do the above. This is an example of a correct basic GET request as per the RFC's:

"GET / HTTP/1.0[CRLF]" where [CRLF] = 0Ah,ODh
or
"GET / HTTP/1.1[LF]" where [CRLF] = 0Ah,ODh

The above should also be case sensitive.

However be aware that some servers are so badly coded (or on purpose) that even this basic test may not work, e.g. "GET / HTTP/1.1" will work but "GET / HTTP/1.0" will NOT work or the server may sit there waiting for a longer url to be requested etc.

Note: 0Ah can often be obtained by [CTRL]+[ENTER]. For anyone interesting in scripting reading this also note many DOS based editors allow you to insert control codes via [CTRL ^P] and followed by [CTRL whatever] where whatever is the appropriate combination required, e.g. [CTRL]+[P] then [CTRL]+[ENTER] or [CTRL]+[P] then [CTRL]+[B] to insert a bell. This is useful to know if for example you wish to feed a text file via redirection to something like netcat.

The vast majority of telnet based servers will tend to respond with a header if you just send a few CRLF or or if that fails a few lineFeeds (CTRL+[ENTER]) or Carriage Returns (ENTER)'s instead, it depends on the server and if the programmer has read the RFC's etc. In the case of HTTP servers, using sending a HEAD request instead of a GET request is also useful.

For anyone needing more info: http://www.google.com/search?q=http+get+telnet

[EDIT]Corrected a technical error that I made whilst quickly writing this reply.

 

Complete thread:

Back to the forum
Board view  Mix view
22781 Postings in 2123 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum