<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>S P I E L P R I N Z I P</title>
	<atom:link href="http://spielprinzip.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://spielprinzip.com</link>
	<description>a computer programmer&#039;s blog</description>
	<lastBuildDate>Wed, 08 Feb 2012 16:49:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Mysql on console</title>
		<link>http://spielprinzip.com/mysql-on-console/</link>
		<comments>http://spielprinzip.com/mysql-on-console/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 16:14:37 +0000</pubDate>
		<dc:creator>wp_admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://spielprinzip.com/?p=200</guid>
		<description><![CDATA[How to work with MySQL on console. ]]></description>
			<content:encoded><![CDATA[<h1 class="paragraphHeader">BASICS</h1>
<p><strong>Connect to Mysql</strong></p>
<div class="code">mysql -hlocalhost -uusername -ppassword databasename</div>
<p><strong>Show Databases</strong></p>
<div class="code">SHOW DATABASES;</div>
<p><strong>Use a Database</strong></p>
<div class="code">USE database;</div>
<p><strong>Show tables in a Database</strong></p>
<div class="code">SHOW TABLES;</strong></div>
<p><strong>Show table structure</strong></p>
<div class="code">mysql> DESCRIBE table;</strong></div>
<h1 class="paragraphHeader">PROCESSES</h1>
<p><strong>Show Processlist</strong></p>
<div class="code">show processlist;</div>
<p><strong>Kill process</strong></p>
<div class="code">kill process id;</div>
]]></content:encoded>
			<wfw:commentRss>http://spielprinzip.com/mysql-on-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Captain Orange</title>
		<link>http://spielprinzip.com/stuff/</link>
		<comments>http://spielprinzip.com/stuff/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 22:35:25 +0000</pubDate>
		<dc:creator>wp_admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>

		<guid isPermaLink="false">http://spielprinzip.com/?p=193</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img src="stuff/../../../stuff/stuff/co_test.jpg" alt="co_test" /></p>
]]></content:encoded>
			<wfw:commentRss>http://spielprinzip.com/stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux snippets</title>
		<link>http://spielprinzip.com/linux-snippets/</link>
		<comments>http://spielprinzip.com/linux-snippets/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 16:30:11 +0000</pubDate>
		<dc:creator>wp_admin</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://spielprinzip.com/?p=181</guid>
		<description><![CDATA[Just a small, unsorted collection of Linux commandline snippets. Just for myself mostly.]]></description>
			<content:encoded><![CDATA[<p><strong>list files and dirs sorted by size</strong></p>
<div class="code">du -cks * |sort -g</div>
<p><strong>list dirs sorted by size</strong></p>
<div class="code">du -cks `find . -maxdepth 2 -type d `|sort -g</div>
<p><strong>find a dir</strong></p>
<div class="code">find -name "images" | less</div>
<p><strong>find file</strong></p>
<div class="code">find -name "file.py" | less</div>
<p><strong>find text in file by dir</strong></p>
<div class="code">grep -r ohohoh /var/some/path/dir/</div>
]]></content:encoded>
			<wfw:commentRss>http://spielprinzip.com/linux-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some important HTTP status codes</title>
		<link>http://spielprinzip.com/some-important-http-status-codes/</link>
		<comments>http://spielprinzip.com/some-important-http-status-codes/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 09:56:06 +0000</pubDate>
		<dc:creator>wp_admin</dc:creator>
				<category><![CDATA[HTTP]]></category>

		<guid isPermaLink="false">http://spielprinzip.com/?p=85</guid>
		<description><![CDATA[A little list of important HTTP status codes, for all of you, that tend to forget things.]]></description>
			<content:encoded><![CDATA[<p>For a complete list, refer to <a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes" title="Wikipedia - list of HTTP status codes"></a></p>
<h1 class="paragraphHeader">100 - 199 [Informational]</h1>
<p>101 Switching Protocols</p>
<h1 class="paragraphHeader">200 - 299 [Success]</h1>
<p>200 OK<br />
203 Non-Authoritative Information (since HTTP/1.1)<br />
204 No Content</p>
<h1 class="paragraphHeader">300 - 399 [Redirection]</h1>
<p>300 Multiple Choices<br />
301 Moved Permanently<br />
302 Found<br />
304 Not Modified<br />
307 Temporary Redirect (since HTTP/1.1)</p>
<h1 class="paragraphHeader">400 - 499 [Client Error]</h1>
<p>400 Bad Request<br />
401 Unauthorized<br />
402 Payment Required<br />
403 Forbidden<br />
404 Not Found<br />
405 Method Not Allowed<br />
408 Request Timeout<br />
414 Request-URI Too Long<br />
429 Too Many Requests<br />
431 Request Header Fields Too Large</p>
<h1 class="paragraphHeader">500 - 599 [Client Error]</h1>
<p>500 Internal Server Error<br />
501 Not Implemented<br />
502 Bad Gateway<br />
503 Service Unavailable<br />
504 Gateway Timeout<br />
505 HTTP Version Not Supported</p>
]]></content:encoded>
			<wfw:commentRss>http://spielprinzip.com/some-important-http-status-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some notes on HTTP headers</title>
		<link>http://spielprinzip.com/some-notes-on-http-headers/</link>
		<comments>http://spielprinzip.com/some-notes-on-http-headers/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 17:54:08 +0000</pubDate>
		<dc:creator>wp_admin</dc:creator>
				<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://spielprinzip.com/?p=122</guid>
		<description><![CDATA[HTTP-Headers: Extra-Informations, which are added to HTTP-request and response messages in a client-server-communication.
]]></description>
			<content:encoded><![CDATA[<p>Basically, HTTP-Headers are simple key-value-pairs, that are sent with request messages to a webserver or vice versa from a webserver as response messages back to a Client. Standard header fields are specified in <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>. Headers do add extra informations to HTTP messages to improve communication. All header fields can - of course - be faked.</p>
<p>The syntax of a HTTP header is as followed:<br />
header_name[separated by colon][optional whitespace]field_value[CRLF]</p>
<h1 class="paragraphHeader">Examples of HTTP headers</h1>
<div class="code">
Content-length: 54124<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)<br />
Content-type: image/gif
</div>
<h1 class="paragraphHeader">HTTP headers are classified into 4 main categories:</h1>
<p>General headers, that carry general informations for both request and response, Request headers that are sent to the server, Response headers, that are sent from the server, and Entity Headers.</p>
<h2 class="paragraphHeader">General Headers</h2>
<p>General headers do appear in both request and response messages and provide very basic informations such as time, encoding, MIME or Caching. </p>
<p>Some important general Headers are for Example:</p>
<div class="code">
Connection: close<br />
Date: Tue, 23 Jan 2002 03:11:28 GMT<br />
Cache-Control: no-cache<br />
Pragma: no-cache
</div>
<h2 class="paragraphHeader">Request Headers</h2>
<p>Request headers are sent in a request message only. These informations basically try to make the server sending are better response.<br />
This header type is subdivided into 5 types: <b>Informational headers,</b> which handle very basic Client-Informations, <b>accept headers,</b> which tell servers client preferences and capabilities, <b>conditional request headers</b> to put restrictions on a request, <b>security headers</b> for client authentication and <b>proxy headers.</b></p>
<p>Some informational headers:</p>
<div class="code">
Host: spielprinzip.com<br />
From: admin@spielprinzip.com<br />
Content-Length: 348<br />
Content-Type: application/x-www-form-urlencoded<br />
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)<br />
Referer: http://spielprinzip.com/some-notes-on-http-headers
</div>
<p>Some accept headers:</p>
<div class="code">
Accept: text/plain<br />
Accept-Charset: utf-8<br />
Accept-Encoding: gzip, deflate
</div>
<p>Some conditional headers:</p>
<div class="code">
If-Modified-Since: Sat, 12 Nov 2010 19:43:31 GMT<br />
If-Unmodified-Since: Sat, 12 Nov 2010 19:43:31 GMT
</div>
<p>Some security headers:</p>
<div class="code">
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
</div>
<h2 class="paragraphHeader">Response Headers</h2>
<p>Response headers are sent in response message from the server only, to provide the client with extra informations about the sender. These informations help clients to handle the response and make better requests in the future. This header type is subdivided into 3 subtypes: <b>Informational headers,</b> which provides basic Server-Informations, <b>negotiation headers,</b> and <b>security headers</b>.</p>
<p>Some informational response headers:</p>
<div class="code">
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux)<br />
Retry-After: 120
</div>
<p>Some negotiation headers:</p>
<div class="code">
Accept-Ranges: bytes<br />
Age: 4
</div>
<p>Some security headers:</p>
<div class="code">
Set-Cookie: UserID=JohnDoe; Max-Age=3600; Version=1<br />
WWW-Authenticate: Basic
</div>
]]></content:encoded>
			<wfw:commentRss>http://spielprinzip.com/some-notes-on-http-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some notes on cURL</title>
		<link>http://spielprinzip.com/some-notes-on-curl/</link>
		<comments>http://spielprinzip.com/some-notes-on-curl/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 11:47:57 +0000</pubDate>
		<dc:creator>wp_admin</dc:creator>
				<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://spielprinzip.com/?p=95</guid>
		<description><![CDATA[Little powerful command-line tool by Daniel Stenberg for transferring data between computers in networks using various protocols such as http, https or ftp. ]]></description>
			<content:encoded><![CDATA[<p>As i keep on forgetting boring things pretty fast, i will post some more or less useful cURL commands on this page just for myself. And for anyone else, as long as he or she might be as dumb as i am. You can do a lot more with cURL than described here:  Proxies, Tunneling, SSL, Fileuploading. Please refer to the <a href="http://curl.haxx.se/">official docs</a> or the man pages for complete options.</p>
<h1 class="paragraphHeader">BASIC HTTP CALL</h1>
<p>do a simple http call on index of example.com</p>
<div class="code">
curl http://www.example.com
</div>
<p>be silent... </p>
<div class="code">
curl -s http://www.example.com
</div>
<p>add some Port... yawn...</p>
<div class="code">
curl http://www.example.com:85/
</div>
<p>include Header Output</p>
<div class="code">
curl --include http://www.example.com:85/
</div>
<p>Verbose Mode</p>
<div class="code">
curl --verbose http://www.example.com
</div>
<h1 class="paragraphHeader">DICT</h1>
<p>Get the definition of the word SOLARIS. For in-depth understanding of the DICT-Protocol, have a look at <a href="http://en.wikipedia.org/wiki/DICT" title="Wikipedia Dict">Wikipedia DICT</a> and for more detailled informations refer to <a href="http://www.dict.org/rfc2229.txt" title="RFC2229">RFC2229</a></p>
<div class="code">
curl dict://dict.org/d:solaris
</div>
<h1 class="paragraphHeader">Insecure HTTPS</h1>
<div class="code">
curl -k https://spielprinzip.com
</div>
<h1 class="paragraphHeader">Save OUTPUT in File</h1>
<p>with flag -o you are able to save the output to a file on a disk</p>
<div class="code">
curl -o saveHere.html http://spielprinzip.com
</div>
<p>with flag --create-dirs cURL will even handle to create the local dir hierachy for you</p>
<div class="code">
curl -o path/to/some/not/existing/dir/saveHere.html --create-dirs http://spielprinzip.com
</div>
<h1 class="paragraphHeader">Get some FTP File</h1>
<div class="code">
curl ftp://user:pass@spielprinzip.com:21/coolfile.txt
</div>
<h1 class="paragraphHeader">Send a FTP NLSD command</h1>
<p>list a directory on a FTP server</p>
<div class="code">
curl -l -u user:name ftp://spielprinzip.com:519
</div>
<h1 class="paragraphHeader">Upload some FTP File</h1>
<div class="code">
curl -T /path/to/a/file  -u user:pass ftp://spielprinzip.com:21
</div>
<h1 class="paragraphHeader">Send some Headers</h1>
<div class="code">
curl --header "Connection:keep-alive" "--header "User-Agent: Warrior 01" http://example.com/someXML.xml
</div>
<h1 class="paragraphHeader">Send some custom Headers</h1>
<div class="code">
curl --header "Secret:15412415" "--header "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0.1)" http://example.com/someXML.xml
</div>
<h1 class="paragraphHeader">GET some data</h1>
<div class="code">
curl http://example.com?p=3&#038;ut=helo
</div>
<h1 class="paragraphHeader">POST some data</h1>
<div class="code">
curl --data "p=4&#038;ut=helo" http://www.example.com/someDir/<br />
curl --data "<xml><very><important>Information</important></very></xml>" http://www.example.com/someDir/
</div>
<h1 class="paragraphHeader">Pass HTACCESS</h1>
<div class="code">
curl --user name:pass http://www.example.com<br />
curl -u name:pass http://spielprinzip.com/secret-page/<br />
curl http://name:pass@protected.example.com
</div>
<h1 class="paragraphHeader">Fake HTTP Referer</h1>
<p>By the way, in <a href="http://tools.ietf.org/html/rfc2068" title="RFC2068">RFC2068</a>, the word Referrer is wrongly written as Referer [sic] and therefor now standard in the HTTP-Specification! This mistake was not adepted to the DOM Specifications. So this may explain the different notation.</p>
<div class="code">
curl --referer http://www.example.come http://www.example.com
</div>
<h1 class="paragraphHeader">FOLLOW LOCATION</h1>
<p>When the server is sending in a redirect header (301, 302), cURL will follow </p>
<div class="code">
curl --location http://www.example.com
</div>
<h1 class="paragraphHeader">Send Cookies</h1>
<p>For advanced Hacking, you often need to send some cookies. This one here is the simple method.<br />
Dig the web for more detailed informations about cookie handling with cURL</p>
<div class="code">
curl --cookie "name=Jack" http://www.example.com
</div>
]]></content:encoded>
			<wfw:commentRss>http://spielprinzip.com/some-notes-on-curl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some notes on Telnet</title>
		<link>http://spielprinzip.com/notes-on-telnet/</link>
		<comments>http://spielprinzip.com/notes-on-telnet/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 11:00:16 +0000</pubDate>
		<dc:creator>wp_admin</dc:creator>
				<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Notes]]></category>

		<guid isPermaLink="false">http://spielprinzip.com/?p=12</guid>
		<description><![CDATA[Remember this funky little network protocol TELNET, which has been invented in the early 70ies? Telnet provides access to a command line interface CLI on a remote host over TCP/IP.]]></description>
			<content:encoded><![CDATA[<p>TELNET is a client/server protocol, which basically needs two services: a Telnet Client and a Telnet Server, which usually is listening on Port 23 of the remote machine.<br />
Since SSH provides powerful encryption and is recommended by security experts, TELNET isn't widly used anymore except by admins and network hackers. However, you can do a lot of useful things with TELNET in your daily life. Sending raw FTP commands, Connecting to a POP-Server, sending custom HTTP-Headers, even establish a secure connection using open_ssl.</p>
<h1 class="paragraphHeader">Connect to a POP3-Server with TELNET</h1>
<p>For example, you could login to your POP-Server and read your mails, if there's no mail client around. Works as well for checking, if the connection to a certain mailserver can be established at all.</p>
<p>First, establish a TELNET session using your favourite console, whereas 110 is the standard port of your pop3 server</p>
<div class="code">
spielprinzip@warmachine:/$ telnet pop.example.org 110
</div>
<p><span id="more-12"></span><br />
Now, lets talk a bit to the POP3 deamon:</p>
<div class="code">
+OK exampleserver.com mailserver ready.</p>
<p>user USERNAME<br />
+OK<br />
pass PASSWORD<br />
+OK Logged in.</p>
<p>stat<br />
+OK 736 159459181</p>
<p>list<br />
732 2420<br />
733 994<br />
734 648<br />
735 637<br />
736 982<br />
.</p>
<p>top 1 0<br />
+OK<br />
Return-Path:<br />
X-Original-To: hello@spielprinzip.com<br />
Delivered-To: user@exampleserver.com<br />
X-policyd-weight: using cached result; rate: -7.6<br />
X-Greylist: delayed 1756 seconds by postgrey-1.31 at dd22012; Sun, 24 Jan 2010 23:57:06 CET<br />
Received: from example.net (unknown [143.99.61.57])<br />
by example.example.com (Postfix) with ESMTPS id 398923DEDE7<br />
for ; Sun, 24 Jan 2010 23:57:05 +0100 (CET)<br />
Received: from example by example.net with local (Exim 4.68)<br />
(envelope-from )<br />
id UISID-0008k0-3X<br />
for hello@spielprinzip.com; Sun, 24 Jan 2010 23:27:43 +0100<br />
Date: Sun, 24 Jan 2010 23:27:43 +0100<br />
To: "hello@spielprinzip.com"<br />
From: ADMIN<br />
Reply-to:ADMIN<br />
Subject: a test email<br />
Message-ID:<br />
X-Priority: 3<br />
X-Mailer: PHPMailer [version 1.73]<br />
MIME-Version: 1.0<br />
Content-Transfer-Encoding: 8bit<br />
Content-Type: text/plain; charset="iso-8859-1"</p>
<p>quit<br />
+OK Logging out<br />
Connection closed by foreign host.</p>
</div>
<p>Explanation:<br />
<code>list</code> gives you a list of your mails<br />
<code>retr 3</code> opens mail 3<br />
<code>top 1 0</code> opens mailheaders from mail 1<br />
<code>top 1 5</code> opens mail with the first 5 lines of mail 1</p>
<h1 class="paragraphHeader">Connect to an IMAP-Server with TELNET</h1>
<p>Working with IMAP is more complicated, because IMAP is far more complex than POP3. You should check <a href="http://tools.ietf.org/html/rfc3501">RFC3501</a>, if you are interested in this protocol. Via TELNET, you  are able to remove, create and rename folders and read and write and change your mails serverside.</p>
<p>Here's a piece of code:</p>
<div class="code">spielprinzip@warz61m:/$ telnet imap.example.com 143<br />
Trying 93.13.131.215...<br />
Connected to imap.example.com.<br />
Escape character is '^]'.<br />
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN AUTH=LOGIN] exampleserver.com mailserver ready.
</div>
<p>Loggin in using your username and password, again, data will be transferred unencrypted on the net</p>
<div class="code">
cc login USERNAME PASSWORD<br />
cc OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in
</div>
<p>Get a list of all your folders on root level</p>
<div class="code">
. list "" "*"<br />
* LIST (\NoInferiors \UnMarked) "/" "zzz"<br />
* LIST (\NoInferiors \UnMarked) "/" "Drafts"<br />
* LIST (\NoInferiors \UnMarked) "/" "INBOX"<br />
. OK List completed.
</div>
<p>Keep the session going, you can do this from time to time</p>
<div class="code">
.noop<br />
. OK NOOP completed.
</div>
<p>List Sub-Folders in Folder "Sent"</p>
<div class="code">
. list "" "Sent"<br />
* LIST (\NoInferiors \UnMarked) "/" "Sent"<br />
. OK List completed.
</div>
<p>Get status of Folder INBOX</p>
<div class="code">
. status INBOX (messages)<br />
* STATUS "INBOX" (MESSAGES 736)<br />
. OK Status completed.
</div>
<p>opens folder INBOX in READ-ONLY mode (for writing, use SELECT)</p>
<div class="code">
. examine INBOX<br />
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent $Forwarded $label1 $label2 $label5 Junk NonJunk $notjunk)<br />
* OK [PERMANENTFLAGS ()] Read-only mailbox.<br />
* 736 EXISTS<br />
* 0 RECENT<br />
* OK [UNSEEN 49] First unseen.<br />
* OK [UIDVALIDITY 1262898431] UIDs valid<br />
* OK [UIDNEXT 7207] Predicted next UID<br />
* OK [HIGHESTMODSEQ 36719] Highest<br />
. OK [READ-ONLY] Select completed.
</div>
<p>fetch some flags</p>
<div class="code">
. fetch 1:2 flags<br />
* 1 FETCH (FLAGS (\Seen))<br />
* 2 FETCH (FLAGS (\Seen))<br />
. OK Fetch completed.
</div>
<p>fetch header of mail 1</p>
<div class="code">
. fetch 1 rfc822.header<br />
Return-Path:<br />
X-Original-To: hello@spielprinzip.com<br />
Delivered-To: user@exampleserver.com<br />
X-policyd-weight: using cached result; rate: -7.6<br />
X-Greylist: delayed 1756 seconds by postgrey-1.31 at dd22012; Sun, 24 Jan 2010 23:57:06 CET<br />
Received: from example.net (unknown [143.99.61.57])<br />
by example.example.com (Postfix) with ESMTPS id 398923DEDE7<br />
for ; Sun, 24 Jan 2010 23:57:05 +0100 (CET)<br />
Received: from example by example.net with local (Exim 4.68)<br />
(envelope-from )<br />
id UISID-0008k0-3X<br />
for hello@spielprinzip.com; Sun, 24 Jan 2010 23:27:43 +0100<br />
Date: Sun, 24 Jan 2010 23:27:43 +0100<br />
To: "hello@spielprinzip.com"<br />
From: ADMIN<br />
Reply-to:ADMIN<br />
Subject: a test email<br />
Message-ID:<br />
X-Priority: 3<br />
X-Mailer: PHPMailer [version 1.73]<br />
MIME-Version: 1.0<br />
Content-Transfer-Encoding: 8bit<br />
Content-Type: text/plain; charset="iso-8859-1"</p>
</div>
<p>With IMAP, it's possible to establish  an encrypted connection via open_ssl for example. Dig into the web, if you are interested in this topic. It's not easy though...</p>
<h1 class="paragraphHeader">Get a HTTP-Resource with TELNET</h1>
<p>Another useful task for TELNET is grabbing HTTP resources, for example a webpage.<br />
Again, establish a TELNET session. 80 is the port, HTTP is commonly listening to:</p>
<div class="code">
spielprinzip@warmachine:/$ telnet spielprinzip.com 80<br />
Trying 85.13.141.215...<br />
Connected to spielprinzip.com.<br />
Escape character is '^]'.
</div>
<p>Now, tell the webserver, which file you want to have, and which host he should use</p>
<div class="code">
GET /index.php HTTP/1.1<br />
HOST: spielprinzip.com
</div>
<p>Press ENTER twice, since this is the delimiter of the HTTP-Header and the body. Writing code, you would use something like this: \r\n\r\n</p>
<p>And here's the content:</p>
<div class="code">
HTTP/1.1 301 Moved Permanently<br />
Date: Sun, 07 Aug 2011 21:30:43 GMT<br />
Server: Apache<br />
X-Powered-By: PHP/5.2.12-nmm2<br />
Set-Cookie: PHPSESSID=0faed70fd1210cc3f644230cf6cac7ee; path=/<br />
X-Pingback: http://spielprinzip.com/xmlrpc.php<br />
Location: http://spielprinzip.com/<br />
Vary: Accept-Encoding<br />
Content-Length: 0<br />
Content-Type: text/html; charset=UTF-8</p>
<p>Connection closed by foreign host.
</p></div>
<p>Passing GET-Parameters is a piece of cake:</p>
<div class="code">
GET /telnet_1.php?p=true&#038;t=something HTTP/1.1<br />
HOST: spielprinzip.com
</div>
<p>For Testing with POST, one should go the easier way and use cURL, wget or some scripting language. Telnet might not be the perfect tool for this kind of testing.</p>
<h1 class="paragraphHeader">Get a HTTPS-Resource with TELNET</h1>
<p>Sending custom headers to a https website, using open_ssl and s_client</p>
<div class="code">
openssl s_client -connect example.com:443<br />
GET / HTTP/1.1<br />
HOST:example.com<br />
mycustomheader: soho
</div>
]]></content:encoded>
			<wfw:commentRss>http://spielprinzip.com/notes-on-telnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

