Author Topic: telnet command auto check mail and html code on telnet  (Read 4637 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
telnet command auto check mail and html code on telnet
« on: พฤศจิกายน 19, 2013, 11:15:15 AM »
DATED = `/bin/date`

###For connection to port 25
( echo "helo example.com"; echo "ehlo example.com"; echo "mail from: golftest@example.com"; echo "rcpt to: golftest@example.com"; echo data; echo "test mail at ${DATED}"; echo .; sleep 2; echo quit ) | telnet ip.xxx.xxx.xxx 25
sleep 4

###For connection to port 110
echo "For connection to port 110"
( echo "user golftest@example.com"; sleep 1; echo "pass yxxxxxxxx"; sleep 1; echo quit ) | telnet ip.xxx.xxx.yyy 110
sleep 4

echo "For connection to Webmail ipv6 port 80 "
( echo "GET /index.php HTTP1.1"; sleep 4; echo quit ) | telnet xxx.xxx.xxx.yyy 80

« Last Edit: พฤศจิกายน 15, 2015, 02:35:57 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: telnet command auto check mail and html code on telnet
« Reply #1 on: พฤศจิกายน 15, 2015, 02:35:42 PM »
#send email with html code on telnet

#telnet 0 25
helo test.test.com
ehlo test.test.com
mail from: test@test.com
rcpt to: test@test.com
data
Subject: test.com
Mime-Version: 1.0;
Content-Type: text/html; charset="ISO-8859-1";
Content-Transfer-Encoding: 7bit;

<html>
<body>
<h2>An important link to look at!</h2>
Here's an <a href="http://www.packetlove.com">important link</a><br>
Enjoy with this picture!
<img src="http://golfreeze.packetlove.com/pix/images/20150518134649_kurobe_dam4.jpg" width="200">
</body>
</html>
.
QUIT
« Last Edit: พฤศจิกายน 15, 2015, 02:38:54 PM by golfreeze »